public abstract static class Context.Storage extends Object
The default implementation will put the current context in a ThreadLocal. If an
alternative implementation named io.grpc.override.ContextStorageOverride exists in the
classpath, it will be used instead of the default implementation.
This API is experimental and subject to change.
| Constructor and Description |
|---|
Storage() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
attach(Context toAttach)
Implements
Context.attach(). |
abstract Context |
current()
Implements
Context.current(). |
abstract void |
detach(Context toDetach,
Context toRestore)
Implements
Context.detach(io.grpc.Context) |
public abstract void attach(Context toAttach)
Context.attach().toAttach - the context to be attachedpublic abstract void detach(Context toDetach, Context toRestore)
Context.detach(io.grpc.Context)toDetach - the context to be detached. Should be, or be equivalent to, the current
context of the current scopetoRestore - the context to be the current. Should be, or be equivalent to, the context
of the outer scopepublic abstract Context current()
Context.current(). Returns the context of the current scope.