Package io.opencensus.common
Interface Scope
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
,NonThrowingCloseable
- All Known Implementing Classes:
CurrentSpanUtils.ScopeInSpan
,CurrentTagMapUtils.WithTagMap
,NoopScope
,NoopScope
public interface Scope extends NonThrowingCloseable
ACloseable
that represents a change to the current context over a scope of code.close()
cannot throw a checked exception.Example of usage:
try (Scope ctx = tryEnter()) { ... }
- Since:
- 0.6
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
-
-
-
Method Detail
-
close
void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceNonThrowingCloseable
-
-