Class ThreadLocalContext.Activation

java.lang.Object
io.fluxzero.sdk.common.ThreadLocalContext.Activation
All Implemented Interfaces:
AutoCloseable
Enclosing class:
ThreadLocalContext

public static final class ThreadLocalContext.Activation extends Object implements AutoCloseable
A reusable context-switching scope created by ThreadLocalContext.openActivation().
  • Method Details

    • use

      public void use(ThreadLocalContext.Snapshot next)
      Replaces the currently active context with the supplied snapshot.
    • close

      public void close()
      Restores the context that was active when this scope was opened.
      Specified by:
      close in interface AutoCloseable