public class PersistenceManagerImpl extends Object implements PersistenceManager
PersistenceManager.AccessMode| Constructor and Description |
|---|
PersistenceManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAllStores(PersistenceManager.AccessMode mode)
Invokes
AdvancedCacheWriter.clear() on all the stores that aloes it. |
protected AsyncCacheWriter |
createAsyncWriter(CacheWriter writer) |
boolean |
deleteFromAllStores(Object key,
PersistenceManager.AccessMode mode) |
void |
disableStore(String storeType)
Marks the given storage as disabled.
|
List<CacheLoader> |
getAllLoaders() |
List<CacheWriter> |
getAllWriters() |
StreamingMarshaller |
getMarshaller() |
Executor |
getPersistenceExecutor() |
AdvancedCacheLoader |
getStateTransferProvider()
Returns the store one configured with fetch persistent state, or null if none exist.
|
<T> Set<T> |
getStores(Class<T> storeClass) |
Collection<String> |
getStoresAsString() |
void |
inject(AdvancedCache<Object,Object> cache,
StreamingMarshaller marshaller,
Configuration configuration,
TransactionManager transactionManager,
TimeService timeService,
ExecutorService persistenceExecutor,
ByteBufferFactory byteBufferFactory,
MarshalledEntryFactory marshalledEntryFactory,
CacheStoreFactoryRegistry cacheStoreFactoryRegistry,
ExpirationManager expirationManager) |
MarshalledEntry |
loadFromAllStores(Object key,
InvocationContext context) |
void |
preload()
Loads the data from the external store into memory during cache startup.
|
void |
processOnAllStores(Executor executor,
KeyFilter keyFilter,
AdvancedCacheLoader.CacheLoaderTask task,
boolean fetchValue,
boolean fetchMetadata) |
void |
processOnAllStores(Executor executor,
KeyFilter keyFilter,
AdvancedCacheLoader.CacheLoaderTask task,
boolean fetchValue,
boolean fetchMetadata,
PersistenceManager.AccessMode mode) |
void |
processOnAllStores(KeyFilter keyFilter,
AdvancedCacheLoader.CacheLoaderTask task,
boolean fetchValue,
boolean fetchMetadata) |
void |
processOnAllStores(KeyFilter keyFilter,
AdvancedCacheLoader.CacheLoaderTask task,
boolean fetchValue,
boolean fetchMetadata,
PersistenceManager.AccessMode mode) |
void |
purgeExpired()
Removes the expired entries from all the existing storage.
|
void |
setClearOnStop(boolean clearOnStop) |
int |
size() |
void |
start()
Invoked on component start
|
void |
stop()
Invoked on component stop
|
void |
writeToAllStores(MarshalledEntry marshalledEntry,
PersistenceManager.AccessMode mode) |
public void inject(AdvancedCache<Object,Object> cache, StreamingMarshaller marshaller, Configuration configuration, TransactionManager transactionManager, TimeService timeService, ExecutorService persistenceExecutor, ByteBufferFactory byteBufferFactory, MarshalledEntryFactory marshalledEntryFactory, CacheStoreFactoryRegistry cacheStoreFactoryRegistry, ExpirationManager expirationManager)
public void start()
Lifecyclepublic void stop()
Lifecyclepublic void preload()
PersistenceManagerpreload in interface PersistenceManagerpublic void disableStore(String storeType)
PersistenceManagerdisableStore in interface PersistenceManagerpublic <T> Set<T> getStores(Class<T> storeClass)
getStores in interface PersistenceManagerpublic Collection<String> getStoresAsString()
getStoresAsString in interface PersistenceManagerpublic void purgeExpired()
PersistenceManagerpurgeExpired in interface PersistenceManagerpublic void clearAllStores(PersistenceManager.AccessMode mode)
PersistenceManagerAdvancedCacheWriter.clear() on all the stores that aloes it.clearAllStores in interface PersistenceManagerpublic boolean deleteFromAllStores(Object key, PersistenceManager.AccessMode mode)
deleteFromAllStores in interface PersistenceManagerpublic void processOnAllStores(KeyFilter keyFilter, AdvancedCacheLoader.CacheLoaderTask task, boolean fetchValue, boolean fetchMetadata)
processOnAllStores in interface PersistenceManagerpublic void processOnAllStores(Executor executor, KeyFilter keyFilter, AdvancedCacheLoader.CacheLoaderTask task, boolean fetchValue, boolean fetchMetadata)
processOnAllStores in interface PersistenceManagerpublic void processOnAllStores(KeyFilter keyFilter, AdvancedCacheLoader.CacheLoaderTask task, boolean fetchValue, boolean fetchMetadata, PersistenceManager.AccessMode mode)
processOnAllStores in interface PersistenceManagerpublic void processOnAllStores(Executor executor, KeyFilter keyFilter, AdvancedCacheLoader.CacheLoaderTask task, boolean fetchValue, boolean fetchMetadata, PersistenceManager.AccessMode mode)
processOnAllStores in interface PersistenceManagerpublic MarshalledEntry loadFromAllStores(Object key, InvocationContext context)
loadFromAllStores in interface PersistenceManagerpublic void writeToAllStores(MarshalledEntry marshalledEntry, PersistenceManager.AccessMode mode)
writeToAllStores in interface PersistenceManagerpublic AdvancedCacheLoader getStateTransferProvider()
PersistenceManagergetStateTransferProvider in interface PersistenceManagerpublic int size()
size in interface PersistenceManagerpublic void setClearOnStop(boolean clearOnStop)
setClearOnStop in interface PersistenceManagerpublic List<CacheLoader> getAllLoaders()
public List<CacheWriter> getAllWriters()
protected AsyncCacheWriter createAsyncWriter(CacheWriter writer)
public Executor getPersistenceExecutor()
public StreamingMarshaller getMarshaller()
Copyright © 2024 JBoss, a division of Red Hat. All rights reserved.