Class TracedPersistenceManager
java.lang.Object
org.infinispan.persistence.support.DelegatingPersistenceManager
org.infinispan.persistence.manager.TracedPersistenceManager
- All Implemented Interfaces:
org.infinispan.commons.api.Lifecycle,PersistenceManager
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.persistence.manager.PersistenceManager
PersistenceManager.AccessMode, PersistenceManager.StoreChangeListener -
Field Summary
Fields inherited from class org.infinispan.persistence.support.DelegatingPersistenceManager
persistenceManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapproximateSize(Predicate<? super StoreConfiguration> predicate, org.infinispan.commons.util.IntSet segments) Returns an approximate count of how many entries are persisted in the given segments.clearAllStores(Predicate<? super StoreConfiguration> predicate) InvokesAdvancedCacheWriter.clear()on all the stores that aloes it.commitAllTxStores(TxInvocationContext<AbstractCacheTransaction> txInvocationContext, Predicate<? super StoreConfiguration> predicate) Perform the commit operation for the provided transaction on all Tx stores.deleteFromAllStores(Object key, int segment, Predicate<? super StoreConfiguration> predicate) <K,V> CompletionStage <MarshallableEntry<K, V>> loadFromAllStores(Object key, int segment, boolean localInvocation, boolean includeStores) Same asPersistenceManager.loadFromAllStores(Object, boolean, boolean)except that the segment of the key is also provided to avoid having to calculate the segment.performBatch(TxInvocationContext<AbstractCacheTransaction> ctx, TriPredicate<? super WriteCommand, Object, MVCCEntry<?, ?>> commandKeyPredicate) Writes a batch for the given modifications in the transactional contextRemoves the expired entries from all the existing storage.rollbackAllTxStores(TxInvocationContext<AbstractCacheTransaction> txInvocationContext, Predicate<? super StoreConfiguration> predicate) Perform the rollback operation for the provided transaction on all Tx stores.size(Predicate<? super StoreConfiguration> predicate, org.infinispan.commons.util.IntSet segments) Returns the count of how many entries are persisted in the given segments.<K,V> CompletionStage <Void> writeEntries(Iterable<MarshallableEntry<K, V>> iterable, Predicate<? super StoreConfiguration> predicate) Writes the entries to the stores that pass the given predicatewriteToAllNonTxStores(MarshallableEntry marshalledEntry, int segment, Predicate<? super StoreConfiguration> predicate, long flags) Methods inherited from class org.infinispan.persistence.support.DelegatingPersistenceManager
addSegments, addStore, addStoreListener, disableStore, getActual, getStores, getStoresAsString, hasStore, hasWriter, isAvailable, isEnabled, isReadOnly, loadFromAllStores, preloadPublisher, prepareAllTxStores, publishEntries, publishEntries, publishEntries, publishKeys, publishKeys, removeSegments, removeStoreListener, setClearOnStop, size, size, start, stop, writeMapCommand, writeToAllNonTxStoresMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.persistence.manager.PersistenceManager
size
-
Constructor Details
-
TracedPersistenceManager
-
-
Method Details
-
purgeExpired
Description copied from interface:PersistenceManagerRemoves the expired entries from all the existing storage.- Specified by:
purgeExpiredin interfacePersistenceManager- Overrides:
purgeExpiredin classDelegatingPersistenceManager
-
clearAllStores
Description copied from interface:PersistenceManagerInvokesAdvancedCacheWriter.clear()on all the stores that aloes it.- Specified by:
clearAllStoresin interfacePersistenceManager- Overrides:
clearAllStoresin classDelegatingPersistenceManager
-
deleteFromAllStores
public CompletionStage<Boolean> deleteFromAllStores(Object key, int segment, Predicate<? super StoreConfiguration> predicate) - Specified by:
deleteFromAllStoresin interfacePersistenceManager- Overrides:
deleteFromAllStoresin classDelegatingPersistenceManager
-
loadFromAllStores
public <K,V> CompletionStage<MarshallableEntry<K,V>> loadFromAllStores(Object key, int segment, boolean localInvocation, boolean includeStores) Description copied from interface:PersistenceManagerSame asPersistenceManager.loadFromAllStores(Object, boolean, boolean)except that the segment of the key is also provided to avoid having to calculate the segment.- Specified by:
loadFromAllStoresin interfacePersistenceManager- Overrides:
loadFromAllStoresin classDelegatingPersistenceManager- Parameters:
key- key to read the entry fromsegment- segment the key maps tolocalInvocation- whether this invocation is a local invocation. Some loaders may be ignored if it is not localincludeStores- if a loader that is also a store can be loaded from- Returns:
- entry that maps to the key
-
approximateSize
public CompletionStage<Long> approximateSize(Predicate<? super StoreConfiguration> predicate, org.infinispan.commons.util.IntSet segments) Description copied from interface:PersistenceManagerReturns an approximate count of how many entries are persisted in the given segments. If no store can handle the request for the given mode, a value of -1 is returned instead.- Specified by:
approximateSizein interfacePersistenceManager- Overrides:
approximateSizein classDelegatingPersistenceManager- Parameters:
predicate- whether a loader can be usedsegments- the segments to include- Returns:
- size or -1 if approximate size couldn't be computed
-
size
public CompletionStage<Long> size(Predicate<? super StoreConfiguration> predicate, org.infinispan.commons.util.IntSet segments) Description copied from interface:PersistenceManagerReturns the count of how many entries are persisted in the given segments. If no store can handle the request for the given mode a value of -1 is returned instead.- Specified by:
sizein interfacePersistenceManager- Overrides:
sizein classDelegatingPersistenceManager- Parameters:
predicate- whether a loader can be usedsegments- segments to check- Returns:
- size or -1 if size couldn't be computed
-
writeToAllNonTxStores
public CompletionStage<Void> writeToAllNonTxStores(MarshallableEntry marshalledEntry, int segment, Predicate<? super StoreConfiguration> predicate, long flags) - Specified by:
writeToAllNonTxStoresin interfacePersistenceManager- Overrides:
writeToAllNonTxStoresin classDelegatingPersistenceManager- Parameters:
flags- Flags used during command invocation- See Also:
-
commitAllTxStores
public CompletionStage<Void> commitAllTxStores(TxInvocationContext<AbstractCacheTransaction> txInvocationContext, Predicate<? super StoreConfiguration> predicate) Description copied from interface:PersistenceManagerPerform the commit operation for the provided transaction on all Tx stores.- Specified by:
commitAllTxStoresin interfacePersistenceManager- Overrides:
commitAllTxStoresin classDelegatingPersistenceManager- Parameters:
txInvocationContext- the transactional context to be committed.predicate- should we commit each store
-
rollbackAllTxStores
public CompletionStage<Void> rollbackAllTxStores(TxInvocationContext<AbstractCacheTransaction> txInvocationContext, Predicate<? super StoreConfiguration> predicate) Description copied from interface:PersistenceManagerPerform the rollback operation for the provided transaction on all Tx stores.- Specified by:
rollbackAllTxStoresin interfacePersistenceManager- Overrides:
rollbackAllTxStoresin classDelegatingPersistenceManager- Parameters:
txInvocationContext- the transactional context to be rolledback.predicate- should we rollback each store
-
writeEntries
public <K,V> CompletionStage<Void> writeEntries(Iterable<MarshallableEntry<K, V>> iterable, Predicate<? super StoreConfiguration> predicate) Description copied from interface:PersistenceManagerWrites the entries to the stores that pass the given predicate- Specified by:
writeEntriesin interfacePersistenceManager- Overrides:
writeEntriesin classDelegatingPersistenceManager- Type Parameters:
K- key typeV- value type- Parameters:
iterable- entries to writepredicate- predicate to test for a store- Returns:
- a stage that when complete the values were written
-
performBatch
public CompletionStage<Long> performBatch(TxInvocationContext<AbstractCacheTransaction> ctx, TriPredicate<? super WriteCommand, Object, MVCCEntry<?, ?>> commandKeyPredicate) Description copied from interface:PersistenceManagerWrites a batch for the given modifications in the transactional context- Specified by:
performBatchin interfacePersistenceManager- Overrides:
performBatchin classDelegatingPersistenceManager- Parameters:
ctx- transactional contextcommandKeyPredicate- predicate to control if a key/value/command combination should be accepted- Returns:
- a stage of how many writes were performed
-