Class ThreadLocalStorageImpl

java.lang.Object
org.apache.fulcrum.yaafi.framework.tls.ThreadLocalStorageImpl
All Implemented Interfaces:
ThreadLocalStorage

public class ThreadLocalStorageImpl extends Object implements ThreadLocalStorage
Implementation of ThreadLocalStorage. The code was pasted from the Hivemnind container written by Howard Lewis Ship and Harish Krishnaswamy
Author:
Siegfried Goeschl
  • Constructor Details

    • ThreadLocalStorageImpl

      public ThreadLocalStorageImpl()
  • Method Details

    • get

      public Object get(String key)
      Description copied from interface: ThreadLocalStorage
      Returns the thread-local object for the given key, or null if no such object exists.
      Specified by:
      get in interface ThreadLocalStorage
      Parameters:
      key - the key for the lookup
      Returns:
      the object
    • put

      public void put(String key, Object value)
      Description copied from interface: ThreadLocalStorage
      Stores the value object at the given key, overwriting any prior value that may have been stored at that key. Care should be taken in selecting keys to avoid naming conflicts; in general, prefixing a key with a module id is a good idea.
      Specified by:
      put in interface ThreadLocalStorage
      Parameters:
      key - the key of the object to store
      value - the value of the object to store
    • containsKey

      public boolean containsKey(String key)
      Description copied from interface: ThreadLocalStorage
      Checks if the thread-local object for the given key exists
      Specified by:
      containsKey in interface ThreadLocalStorage
      Parameters:
      key - the key for the lookup
      Returns:
      true the object exists
    • clear

      public void clear()
      Description copied from interface: ThreadLocalStorage
      Clears all keys.
      Specified by:
      clear in interface ThreadLocalStorage