public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapter implements CacheStoreManager
Modifier and Type | Field and Description |
---|---|
protected boolean |
alwaysKeepBinary
Always keep binary.
|
protected CacheStore<?,?> |
cfgStore |
protected CacheStore<Object,Object> |
store |
cctx, log, starting
Constructor and Description |
---|
GridCacheStoreManagerAdapter() |
Modifier and Type | Method and Description |
---|---|
protected abstract CacheConfiguration |
cacheConfiguration() |
boolean |
configured() |
CacheStore<?,?> |
configuredStore() |
void |
forceFlush() |
protected abstract GridKernalContext |
igniteContext() |
void |
initialize(CacheStore cfgStore,
Map sesHolders)
Initialize store manager.
|
boolean |
isLocal() |
boolean |
isWriteBehind() |
boolean |
isWriteThrough() |
boolean |
isWriteToStoreFromDht() |
Object |
load(IgniteInternalTx tx,
KeyCacheObject key)
Loads data from persistent store.
|
boolean |
loadAll(IgniteInternalTx tx,
Collection keys,
IgniteBiInClosure vis)
Loads data from persistent store.
|
boolean |
loadCache(GridInClosure3 vis,
Object[] args)
Loads data from persistent store.
|
void |
localStoreLoadAll(IgniteInternalTx tx,
Collection keys,
GridInClosure3 vis) |
boolean |
put(IgniteInternalTx tx,
KeyCacheObject key,
CacheObject val,
GridCacheVersion ver)
Puts key-value pair into storage.
|
boolean |
putAll(IgniteInternalTx tx,
Map<? extends KeyCacheObject,IgniteBiTuple<? extends CacheObject,GridCacheVersion>> map)
Puts key-value pair into storage.
|
boolean |
remove(IgniteInternalTx tx,
KeyCacheObject key) |
boolean |
removeAll(IgniteInternalTx tx,
Collection<? extends KeyCacheObject> keys) |
void |
sessionEnd(IgniteInternalTx tx,
boolean commit,
boolean last) |
protected void |
start0() |
protected void |
stop0(boolean cancel,
boolean destroy) |
CacheStore<Object,Object> |
store() |
void |
writeBehindSessionEnd(boolean threwEx)
End session initiated by write-behind store.
|
void |
writeBehindSessionInit()
End session initiated by write-behind store.
|
context, kernalStartInfo, kernalStopInfo, log, onDisconnected, onKernalStart, onKernalStart0, onKernalStop, onKernalStop0, printMemoryStats, start, startInfo, stop, stopInfo, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
configuredConvertBinary, convertBinary
onDisconnected, onKernalStart, onKernalStop, printMemoryStats, start, stop
protected CacheStore<Object,Object> store
protected CacheStore<?,?> cfgStore
protected boolean alwaysKeepBinary
public void initialize(@Nullable CacheStore cfgStore, Map sesHolders) throws IgniteCheckedException
initialize
in interface CacheStoreManager
cfgStore
- Actual store.sesHolders
- Session holders.IgniteCheckedException
- If failed.public boolean isWriteThrough()
isWriteThrough
in interface CacheStoreManager
True
is write-through is enabled.protected void start0() throws IgniteCheckedException
start0
in class GridCacheManagerAdapter
IgniteCheckedException
- If failed.protected void stop0(boolean cancel, boolean destroy)
stop0
in class GridCacheManagerAdapter
cancel
- Cancel flag.destroy
- Cache destroy flag.public boolean isLocal()
isLocal
in interface CacheStoreManager
true
If local store is configured.public boolean configured()
configured
in interface CacheStoreManager
true
If store configured.public CacheStore<?,?> configuredStore()
configuredStore
in interface CacheStoreManager
@Nullable public final Object load(@Nullable IgniteInternalTx tx, KeyCacheObject key) throws IgniteCheckedException
load
in interface CacheStoreManager
tx
- Cache transaction.key
- Cache key.IgniteCheckedException
- If data loading failed.public boolean isWriteBehind()
isWriteBehind
in interface CacheStoreManager
True
is write-behind is enabled.public boolean isWriteToStoreFromDht()
isWriteToStoreFromDht
in interface CacheStoreManager
public final void localStoreLoadAll(@Nullable IgniteInternalTx tx, Collection keys, GridInClosure3 vis) throws IgniteCheckedException
localStoreLoadAll
in interface CacheStoreManager
tx
- Cache transaction.keys
- Cache keys.vis
- Closure to apply for loaded elements.IgniteCheckedException
- If data loading failed.public final boolean loadAll(@Nullable IgniteInternalTx tx, Collection keys, IgniteBiInClosure vis) throws IgniteCheckedException
loadAll
in interface CacheStoreManager
tx
- Cache transaction.keys
- Cache keys.vis
- Closure.True
if there is a persistent storage.IgniteCheckedException
- If data loading failed.public final boolean loadCache(GridInClosure3 vis, Object[] args) throws IgniteCheckedException
loadCache
in interface CacheStoreManager
vis
- Closer to cache loaded elements.args
- User arguments.True
if there is a persistent storage.IgniteCheckedException
- If data loading failed.public final boolean put(@Nullable IgniteInternalTx tx, KeyCacheObject key, CacheObject val, GridCacheVersion ver) throws IgniteCheckedException
put
in interface CacheStoreManager
tx
- Cache transaction.key
- Key.val
- Value.ver
- Version.true
If there is a persistent storage.IgniteCheckedException
- If storage failed.public final boolean putAll(@Nullable IgniteInternalTx tx, Map<? extends KeyCacheObject,IgniteBiTuple<? extends CacheObject,GridCacheVersion>> map) throws IgniteCheckedException
putAll
in interface CacheStoreManager
tx
- Cache transaction.map
- Map.True
if there is a persistent storage.IgniteCheckedException
- If storage failed.public final boolean remove(@Nullable IgniteInternalTx tx, KeyCacheObject key) throws IgniteCheckedException
remove
in interface CacheStoreManager
tx
- Cache transaction.key
- Key.True
if there is a persistent storage.IgniteCheckedException
- If storage failed.public final boolean removeAll(@Nullable IgniteInternalTx tx, Collection<? extends KeyCacheObject> keys) throws IgniteCheckedException
removeAll
in interface CacheStoreManager
tx
- Cache transaction.keys
- Key.True
if there is a persistent storage.IgniteCheckedException
- If storage failed.public CacheStore<Object,Object> store()
store
in interface CacheStoreManager
public void forceFlush() throws IgniteCheckedException
forceFlush
in interface CacheStoreManager
IgniteCheckedException
- If failed.public final void sessionEnd(IgniteInternalTx tx, boolean commit, boolean last) throws IgniteCheckedException
sessionEnd
in interface CacheStoreManager
tx
- Transaction.commit
- Commit.IgniteCheckedException
- If failed.public void writeBehindSessionInit() throws IgniteCheckedException
writeBehindSessionInit
in interface CacheStoreManager
IgniteCheckedException
- If failed.public void writeBehindSessionEnd(boolean threwEx) throws IgniteCheckedException
writeBehindSessionEnd
in interface CacheStoreManager
threwEx
- If exception was thrown.IgniteCheckedException
- If failed.protected abstract GridKernalContext igniteContext()
protected abstract CacheConfiguration cacheConfiguration()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017