- All Superinterfaces:
AutoCloseable
A Scope that can be (eventually) closed. Used when making a span active.
-
Method Summary
-
Method Details
-
close
void close()- Specified by:
close
in interfaceAutoCloseable
-
isClosed
boolean isClosed()Whether the methodclose()
was already called or not.- Returns:
- if this scope is closed
-
unwrap
Access the underlying scope by specific type. This is a dangerous operation that will succeed only if the scope is of expected type. This practically removes abstraction capabilities of this API.- Type Parameters:
T
- type of the scope- Parameters:
scopeClass
- type to access- Returns:
- instance of the scope
- Throws:
IllegalArgumentException
- in case the scope cannot provide the expected type
-