Class DelegatingCacheWriter<K,V>

All Implemented Interfaces:
Lifecycle, CacheWriter<K,V>

public abstract class DelegatingCacheWriter<K,V> extends Object implements CacheWriter<K,V>
Mircea Markus
  • Field Details

  • Constructor Details

    • DelegatingCacheWriter

      public DelegatingCacheWriter(CacheWriter<K,V> actual)
  • Method Details

    • init

      public void init(InitializationContext ctx)
      Description copied from interface: CacheWriter
      Used to initialize a cache loader. Typically invoked by the PersistenceManager when setting up cache loaders.
      Specified by:
      init in interface CacheWriter<K,V>
    • start

      public void start()
      Description copied from interface: Lifecycle
      Invoked on component start
      Specified by:
      start in interface Lifecycle
    • stop

      public void stop()
      Description copied from interface: Lifecycle
      Invoked on component stop
      Specified by:
      stop in interface Lifecycle
    • write

      public void write(MarshallableEntry<? extends K,? extends V> entry)
      Description copied from interface: CacheWriter
      Persists the entry to the storage.
      Specified by:
      write in interface CacheWriter<K,V>
      See Also:
    • delete

      public boolean delete(Object key)
      Specified by:
      delete in interface CacheWriter<K,V>
      true if the entry existed in the persistent store and it was deleted.
    • undelegate

      public CacheWriter undelegate()