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 java.lang.Object implements ListenableStorageEngine<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<RecoveryStorageEngineListener<? super K,? super V>>recoveryListenersprivate java.util.Set<RuntimeStorageEngineListener<? super K,? super V>>runtimeListeners
-
Constructor Summary
Constructors Constructor Description AbstractListenableStorageEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfireCleared()protected voidfireCopied(int hash, long oldEncoding, long newEncoding, int metadata)protected voidfireFreed(long encoding, int hash, java.nio.ByteBuffer binaryKey, boolean removed)protected voidfireRecovered(java.util.concurrent.Callable<K> key, java.util.concurrent.Callable<V> value, java.nio.ByteBuffer binaryKey, java.nio.ByteBuffer binaryValue, int hash, int metadata, long encoding)protected voidfireWritten(K key, V value, java.nio.ByteBuffer binaryKey, java.nio.ByteBuffer binaryValue, int hash, int metadata, long encoding)protected booleanhasListeners()protected booleanhasRecoveryListeners()voidregisterListener(StorageEngineListener<? super K,? super V> listener)
-
-
-
Field Detail
-
runtimeListeners
private final java.util.Set<RuntimeStorageEngineListener<? super K,? super V>> runtimeListeners
-
recoveryListeners
private final java.util.Set<RecoveryStorageEngineListener<? super K,? super V>> recoveryListeners
-
-
Method Detail
-
registerListener
public void registerListener(StorageEngineListener<? super K,? super V> listener)
- Specified by:
registerListenerin interfaceListenableStorageEngine<K,V>
-
hasListeners
protected final boolean hasListeners()
-
hasRecoveryListeners
protected final boolean hasRecoveryListeners()
-
fireRecovered
protected final void fireRecovered(java.util.concurrent.Callable<K> key, java.util.concurrent.Callable<V> value, java.nio.ByteBuffer binaryKey, java.nio.ByteBuffer binaryValue, int hash, int metadata, long encoding)
-
fireWritten
protected final void fireWritten(K key, V value, java.nio.ByteBuffer binaryKey, java.nio.ByteBuffer binaryValue, int hash, int metadata, long encoding)
-
fireFreed
protected final void fireFreed(long encoding, int hash, java.nio.ByteBuffer binaryKey, boolean removed)
-
fireCleared
protected final void fireCleared()
-
fireCopied
protected final void fireCopied(int hash, long oldEncoding, long newEncoding, int metadata)
-
-