Package org.shoal.ha.cache.impl.store
Class DataStoreEntryUpdater<K,V>
- java.lang.Object
-
- org.shoal.ha.cache.impl.store.DataStoreEntryUpdater<K,V>
-
- Direct Known Subclasses:
SimpleDataStoreEntryUpdater,SimpleStoreableDataStoreEntryUpdater,StoreableDataStoreEntryUpdater
public abstract class DataStoreEntryUpdater<K,V> extends java.lang.Object- Author:
- Mahesh Kannan
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.logging.Logger_loggerprotected DataStoreContext<K,V>ctx
-
Constructor Summary
Constructors Constructor Description DataStoreEntryUpdater()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected byte[]captureState(V v)abstract LoadResponseCommand<K,V>createLoadResponseCommand(DataStoreEntry<K,V> entry, K k, long minVersion)abstract SaveCommand<K,V>createSaveCommand(DataStoreEntry<K,V> entry, K k, V v)protected VdeserializeV(byte[] rawV)abstract voidexecuteSave(DataStoreEntry<K,V> entry, SaveCommand<K,V> cmd)abstract voidexecuteTouch(DataStoreEntry<K,V> entry, TouchCommand<K,V> cmd)abstract VextractVFrom(LoadResponseCommand<K,V> cmd)abstract byte[]getState(V v)abstract VgetV(DataStoreEntry<K,V> entry)voidinitialize(DataStoreContext<K,V> ctx)protected voidprintEntryInfo(java.lang.String msg, DataStoreEntry<K,V> entry, K key)protected voidupdateMetaInfoInDataStoreEntry(DataStoreEntry<K,V> entry, AbstractSaveCommand<K,V> cmd)
-
-
-
Field Detail
-
_logger
protected static final transient java.util.logging.Logger _logger
-
ctx
protected DataStoreContext<K,V> ctx
-
-
Method Detail
-
initialize
public void initialize(DataStoreContext<K,V> ctx)
-
captureState
protected byte[] captureState(V v) throws DataStoreException
- Throws:
DataStoreException
-
deserializeV
protected V deserializeV(byte[] rawV) throws DataStoreException
- Throws:
DataStoreException
-
updateMetaInfoInDataStoreEntry
protected void updateMetaInfoInDataStoreEntry(DataStoreEntry<K,V> entry, AbstractSaveCommand<K,V> cmd)
-
printEntryInfo
protected void printEntryInfo(java.lang.String msg, DataStoreEntry<K,V> entry, K key)
-
createSaveCommand
public abstract SaveCommand<K,V> createSaveCommand(DataStoreEntry<K,V> entry, K k, V v)
-
createLoadResponseCommand
public abstract LoadResponseCommand<K,V> createLoadResponseCommand(DataStoreEntry<K,V> entry, K k, long minVersion) throws DataStoreException
- Throws:
DataStoreException
-
executeSave
public abstract void executeSave(DataStoreEntry<K,V> entry, SaveCommand<K,V> cmd) throws DataStoreException
- Throws:
DataStoreException
-
executeTouch
public abstract void executeTouch(DataStoreEntry<K,V> entry, TouchCommand<K,V> cmd) throws DataStoreException
- Throws:
DataStoreException
-
getV
public abstract V getV(DataStoreEntry<K,V> entry) throws DataStoreException
- Throws:
DataStoreException
-
extractVFrom
public abstract V extractVFrom(LoadResponseCommand<K,V> cmd) throws DataStoreException
- Throws:
DataStoreException
-
getState
public abstract byte[] getState(V v) throws DataStoreException
- Throws:
DataStoreException
-
-