Package org.h2.util

Class DebuggingThreadLocal<T>

java.lang.Object
org.h2.util.DebuggingThreadLocal<T>
Type Parameters:
T - the type

public class DebuggingThreadLocal<T> extends Object
Similar to ThreadLocal, except that it allows its data to be read from other threads - useful for debugging info.
  • Field Details

  • Constructor Details

    • DebuggingThreadLocal

      public DebuggingThreadLocal()
  • Method Details

    • set

      public void set(T value)
    • remove

      public void remove()
      Remove the value for the current thread.
    • get

      public T get()
    • getSnapshotOfAllThreads

      public HashMap<Long,T> getSnapshotOfAllThreads()
      Get a snapshot of the data of all threads.
      Returns:
      a HashMap containing a mapping from thread-id to value