Package org.infinispan.persistence.async
Class AdvancedAsyncCacheLoader<K,V>
- java.lang.Object
-
- org.infinispan.persistence.support.DelegatingCacheLoader<K,V>
-
- org.infinispan.persistence.async.AsyncCacheLoader<K,V>
-
- org.infinispan.persistence.async.AdvancedAsyncCacheLoader<K,V>
-
- All Implemented Interfaces:
org.infinispan.commons.api.Lifecycle
,AdvancedCacheLoader<K,V>
,CacheLoader<K,V>
public class AdvancedAsyncCacheLoader<K,V> extends AsyncCacheLoader<K,V> implements AdvancedCacheLoader<K,V>
- Since:
- 6.0
- Author:
- Mircea Markus
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.persistence.spi.AdvancedCacheLoader
AdvancedCacheLoader.CacheLoaderTask<K,V>, AdvancedCacheLoader.TaskContext
-
-
Field Summary
-
Fields inherited from class org.infinispan.persistence.async.AsyncCacheLoader
state
-
Fields inherited from class org.infinispan.persistence.support.DelegatingCacheLoader
actual, ctx
-
-
Constructor Summary
Constructors Constructor Description AdvancedAsyncCacheLoader(CacheLoader actual, AtomicReference<State> state)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.reactivestreams.Publisher<MarshalledEntry<K,V>>
publishEntries(Predicate<? super K> filter, boolean fetchValue, boolean fetchMetadata)
Publishes all entries from this store.org.reactivestreams.Publisher<K>
publishKeys(Predicate<? super K> filter)
Publishes all the keys from this store.int
size()
Returns the number of elements in the store.-
Methods inherited from class org.infinispan.persistence.async.AsyncCacheLoader
contains, load, start, stop
-
Methods inherited from class org.infinispan.persistence.support.DelegatingCacheLoader
init, undelegate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.persistence.spi.AdvancedCacheLoader
process
-
Methods inherited from interface org.infinispan.persistence.spi.CacheLoader
contains, init, isAvailable, load
-
-
-
-
Constructor Detail
-
AdvancedAsyncCacheLoader
public AdvancedAsyncCacheLoader(CacheLoader actual, AtomicReference<State> state)
-
-
Method Detail
-
publishKeys
public org.reactivestreams.Publisher<K> publishKeys(Predicate<? super K> filter)
Description copied from interface:AdvancedCacheLoader
Publishes all the keys from this store. The given publisher can be used by as manySubscriber
s as desired. Keys are not retrieved until a given Subscriber requests them from theSubscription
.Stores will return only non expired keys
- Specified by:
publishKeys
in interfaceAdvancedCacheLoader<K,V>
- Parameters:
filter
- a filter- Returns:
- a publisher that will provide the keys from the store
-
publishEntries
public org.reactivestreams.Publisher<MarshalledEntry<K,V>> publishEntries(Predicate<? super K> filter, boolean fetchValue, boolean fetchMetadata)
Description copied from interface:AdvancedCacheLoader
Publishes all entries from this store. The given publisher can be used by as manySubscriber
s as desired. Entries are not retrieved until a given Subscriber requests them from theSubscription
.If fetchMetadata is true this store must guarantee to not return any expired entries.
- Specified by:
publishEntries
in interfaceAdvancedCacheLoader<K,V>
- Returns:
-
size
public int size()
Description copied from interface:AdvancedCacheLoader
Returns the number of elements in the store.- Specified by:
size
in interfaceAdvancedCacheLoader<K,V>
-
-