public class PassivationPersistenceManager extends DelegatingPersistenceManager
PersistenceManager.AccessModecomponentRegistry, persistenceManager| Constructor and Description |
|---|
PassivationPersistenceManager(PersistenceManager persistenceManager) |
| Modifier and Type | Method and Description |
|---|---|
<K,V> CompletionStage<MarshallableEntry<K,V>> |
loadFromAllStores(Object key,
boolean localInvocation,
boolean includeStores)
Loads an entry from the persistence store for the given key.
|
<K,V> CompletionStage<MarshallableEntry<K,V>> |
loadFromAllStores(Object key,
int segment,
boolean localInvocation,
boolean includeStores)
Same as
PersistenceManager.loadFromAllStores(Object, boolean, boolean) except that the segment of the key is also
provided to avoid having to calculate the segment. |
CompletionStage<Void> |
passivate(MarshallableEntry marshallableEntry,
int segment) |
int |
pendingPassivations() |
<K,V> org.reactivestreams.Publisher<MarshallableEntry<K,V>> |
publishEntries(boolean fetchValue,
boolean fetchMetadata)
|
<K,V> org.reactivestreams.Publisher<MarshallableEntry<K,V>> |
publishEntries(IntSet segments,
Predicate<? super K> filter,
boolean fetchValue,
boolean fetchMetadata,
Predicate<? super StoreConfiguration> predicate)
Returns a publisher that will publish entries that map to the provided segments.
|
<K,V> org.reactivestreams.Publisher<MarshallableEntry<K,V>> |
publishEntries(Predicate<? super K> filter,
boolean fetchValue,
boolean fetchMetadata,
Predicate<? super StoreConfiguration> predicate)
Returns a publisher that will publish all entries stored by the underlying cache store.
|
<K> org.reactivestreams.Publisher<K> |
publishKeys(IntSet segments,
Predicate<? super K> filter,
Predicate<? super StoreConfiguration> predicate)
Returns a publisher that will publish keys that map to the provided segments.
|
<K> org.reactivestreams.Publisher<K> |
publishKeys(Predicate<? super K> filter,
Predicate<? super StoreConfiguration> predicate)
Returns a publisher that will publish all keys stored by the underlying cache store.
|
CompletionStage<Long> |
size(Predicate<? super StoreConfiguration> predicate)
Returns the count of how many entries are persisted.
|
addSegments, clearAllStores, commitAllTxStores, deleteFromAllStores, disableStore, getActual, getStores, getStoresAsString, hasWriter, isAvailable, isEnabled, isPreloaded, isReadOnly, performBatch, preload, prepareAllTxStores, purgeExpired, removeSegments, rollbackAllTxStores, setClearOnStop, size, size, start, stop, writeEntries, writeMapCommand, writeToAllNonTxStores, writeToAllNonTxStorespublic PassivationPersistenceManager(PersistenceManager persistenceManager)
public CompletionStage<Void> passivate(MarshallableEntry marshallableEntry, int segment)
public <K,V> CompletionStage<MarshallableEntry<K,V>> loadFromAllStores(Object key, int segment, boolean localInvocation, boolean includeStores)
PersistenceManagerPersistenceManager.loadFromAllStores(Object, boolean, boolean) except that the segment of the key is also
provided to avoid having to calculate the segment.loadFromAllStores in interface PersistenceManagerloadFromAllStores in class DelegatingPersistenceManagerkey - 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 frompublic <K,V> CompletionStage<MarshallableEntry<K,V>> loadFromAllStores(Object key, boolean localInvocation, boolean includeStores)
PersistenceManagerloadFromAllStores in interface PersistenceManagerloadFromAllStores in class DelegatingPersistenceManagerkey - key to read the entry fromlocalInvocation - 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 frompublic <K> org.reactivestreams.Publisher<K> publishKeys(Predicate<? super K> filter, Predicate<? super StoreConfiguration> predicate)
PersistenceManagerAdvancedCacheLoader will be used. Predicate is applied by the underlying
loader in a best attempt to improve performance.
This method should be preferred over PersistenceManager.publishEntries(Predicate, boolean, boolean, Predicate) when only
keys are desired as many stores can do this in a significantly more performant way.
This publisher will never return a key which belongs to an expired entry
publishKeys in interface PersistenceManagerpublishKeys in class DelegatingPersistenceManagerK - key typefilter - filter so that only keys which match are returnedpredicate - access mode to choose what type of loader to usepublic <K> org.reactivestreams.Publisher<K> publishKeys(IntSet segments, Predicate<? super K> filter, Predicate<? super StoreConfiguration> predicate)
PersistenceManager
This method should be preferred over PersistenceManager.publishEntries(IntSet, Predicate, boolean, boolean, Predicate)
when only keys are desired as many stores can do this in a significantly more performant way.
This publisher will never return a key which belongs to an expired entry
publishKeys in interface PersistenceManagerpublishKeys in class DelegatingPersistenceManagerK - key typesegments - only keys that map to these segments are processedfilter - filter so that only keys which match are returnedpredicate - access mode to choose what type of loader to usepublic <K,V> org.reactivestreams.Publisher<MarshallableEntry<K,V>> publishEntries(boolean fetchValue, boolean fetchMetadata)
PersistenceManagerpublishEntries in interface PersistenceManagerpublishEntries in class DelegatingPersistenceManagerpublic <K,V> org.reactivestreams.Publisher<MarshallableEntry<K,V>> publishEntries(Predicate<? super K> filter, boolean fetchValue, boolean fetchMetadata, Predicate<? super StoreConfiguration> predicate)
PersistenceManagerAdvancedCacheLoader will be used. Predicate is applied by the underlying
loader in a best attempt to improve performance.
Caller can tell the store to also fetch the value or metadata. In some cases this can improve performance. If metadata is not fetched the publisher may include expired entries.
publishEntries in interface PersistenceManagerpublishEntries in class DelegatingPersistenceManagerK - key typeV - value typefilter - filter so that only entries whose key matches are returnedfetchValue - whether to fetch value or notfetchMetadata - whether to fetch metadata or notpredicate - whether a store can be used by publish entriespublic <K,V> org.reactivestreams.Publisher<MarshallableEntry<K,V>> publishEntries(IntSet segments, Predicate<? super K> filter, boolean fetchValue, boolean fetchMetadata, Predicate<? super StoreConfiguration> predicate)
PersistenceManagerpublishEntries in interface PersistenceManagerpublishEntries in class DelegatingPersistenceManagerK - key typeV - value typesegments - only entries that map to these segments are processedfilter - filter so that only entries whose key matches are returnedfetchValue - whether to fetch value or notfetchMetadata - whether to fetch metadata or notpredicate - whether a store can be used by publish entriespublic CompletionStage<Long> size(Predicate<? super StoreConfiguration> predicate)
PersistenceManagersize in interface PersistenceManagersize in class DelegatingPersistenceManagerpredicate - whether a loader can be usedpublic int pendingPassivations()
Copyright © 2021 JBoss by Red Hat. All rights reserved.