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
ACloseablethat 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 voidclose()
-
-
-
Method Detail
-
close
void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceNonThrowingCloseable
-
-