org.terracotta.offheapstore.storage.listener
Class AbstractListenableStorageEngine<K,V>

java.lang.Object
  extended by org.terracotta.offheapstore.storage.listener.AbstractListenableStorageEngine<K,V>
All Implemented Interfaces:
ListenableStorageEngine<K,V>
Direct Known Subclasses:
PortabilityBasedStorageEngine

public abstract class AbstractListenableStorageEngine<K,V>
extends Object
implements ListenableStorageEngine<K,V>


Constructor Summary
AbstractListenableStorageEngine()
           
 
Method Summary
protected  void fireCleared()
           
protected  void fireCopied(int hash, long oldEncoding, long newEncoding, int metadata)
           
protected  void fireFreed(long encoding, int hash, ByteBuffer binaryKey, boolean removed)
           
protected  void fireRecovered(Callable<K> key, Callable<V> value, ByteBuffer binaryKey, ByteBuffer binaryValue, int hash, int metadata, long encoding)
           
protected  void fireWritten(K key, V value, ByteBuffer binaryKey, ByteBuffer binaryValue, int hash, int metadata, long encoding)
           
protected  boolean hasListeners()
           
protected  boolean hasRecoveryListeners()
           
 void registerListener(StorageEngineListener<? super K,? super V> listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractListenableStorageEngine

public AbstractListenableStorageEngine()
Method Detail

registerListener

public void registerListener(StorageEngineListener<? super K,? super V> listener)
Specified by:
registerListener in interface ListenableStorageEngine<K,V>

hasListeners

protected final boolean hasListeners()

hasRecoveryListeners

protected final boolean hasRecoveryListeners()

fireRecovered

protected final void fireRecovered(Callable<K> key,
                                   Callable<V> value,
                                   ByteBuffer binaryKey,
                                   ByteBuffer binaryValue,
                                   int hash,
                                   int metadata,
                                   long encoding)

fireWritten

protected final void fireWritten(K key,
                                 V value,
                                 ByteBuffer binaryKey,
                                 ByteBuffer binaryValue,
                                 int hash,
                                 int metadata,
                                 long encoding)

fireFreed

protected final void fireFreed(long encoding,
                               int hash,
                               ByteBuffer binaryKey,
                               boolean removed)

fireCleared

protected final void fireCleared()

fireCopied

protected final void fireCopied(int hash,
                                long oldEncoding,
                                long newEncoding,
                                int metadata)


Copyright © 2016. All Rights Reserved.