Class AbstractListenableStorageEngine<K,V>
java.lang.Object
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>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Set<RecoveryStorageEngineListener<? super K, ? super V>> private final Set<RuntimeStorageEngineListener<? super K, ? super V>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidprotected final voidfireCopied(int hash, long oldEncoding, long newEncoding, int metadata) protected final voidfireFreed(long encoding, int hash, ByteBuffer binaryKey, boolean removed) protected final voidfireRecovered(Callable<K> key, Callable<V> value, ByteBuffer binaryKey, ByteBuffer binaryValue, int hash, int metadata, long encoding) protected final voidfireWritten(K key, V value, ByteBuffer binaryKey, ByteBuffer binaryValue, int hash, int metadata, long encoding) protected final booleanprotected final booleanvoidregisterListener(StorageEngineListener<? super K, ? super V> listener)
-
Field Details
-
runtimeListeners
-
recoveryListeners
-
-
Constructor Details
-
AbstractListenableStorageEngine
public AbstractListenableStorageEngine()
-
-
Method Details
-
registerListener
- Specified by:
registerListenerin interfaceListenableStorageEngine<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
-
fireCleared
protected final void fireCleared() -
fireCopied
protected final void fireCopied(int hash, long oldEncoding, long newEncoding, int metadata)
-