Class SimpleObjectCache<T>

java.lang.Object
de.hybris.platform.cache2.SimpleObjectCache<T>
All Implemented Interfaces:
ObjectCache<T>

public class SimpleObjectCache<T> extends Object implements ObjectCache<T>
  • Constructor Details

    • SimpleObjectCache

      public SimpleObjectCache()
  • Method Details

    • getObject

      public T getObject(ObjectKey<T> objectKey)
      Description copied from interface: ObjectCache
      Get the object which is found under the given key. Returns null when no object is found.
      Specified by:
      getObject in interface ObjectCache<T>
      Returns:
      Object or null if there was no object with the given key in the cache.
    • addObject

      public void addObject(ObjectKey<T> objectKey, T object)
      Description copied from interface: ObjectCache
      Adds an object under the given key to the cache.
      Specified by:
      addObject in interface ObjectCache<T>
      Parameters:
      objectKey - the ObjectKey
      object - the object to be added
    • removeObject

      public T removeObject(ObjectKey<T> objectKey)
      Description copied from interface: ObjectCache
      Removes an object from the cache.
      Specified by:
      removeObject in interface ObjectCache<T>
      Parameters:
      objectKey - ObjectKey
      Returns:
      the bean if it was mapped before or null
    • clear

      public void clear()
      Description copied from interface: ObjectCache
      Clear the cache.
      Specified by:
      clear in interface ObjectCache<T>