Package org.infinispan.persistence.rest
Class RestStore<K,V>
- java.lang.Object
-
- org.infinispan.persistence.rest.RestStore<K,V>
-
- All Implemented Interfaces:
Lifecycle
,AdvancedCacheLoader<K,V>
,AdvancedCacheWriter<K,V>
,AdvancedLoadWriteStore<K,V>
,CacheLoader<K,V>
,CacheWriter<K,V>
,ExternalStore<K,V>
@ThreadSafe public class RestStore<K,V> extends Object implements AdvancedLoadWriteStore<K,V>
Deprecated.This cache store will be changed to only implementCacheLoader
RestStore.- Since:
- 6.0
- Author:
- Tristan Tarrant
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.persistence.spi.AdvancedCacheWriter
AdvancedCacheWriter.PurgeListener<K>
-
-
Constructor Summary
Constructors Constructor Description RestStore()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear()
Deprecated.Removes all the data from the storage.boolean
contains(Object o)
Deprecated.Returns true if the storage contains an entry associated with the given key.boolean
delete(Object key)
Deprecated.io.reactivex.rxjava3.core.Flowable<MarshallableEntry<K,V>>
entryPublisher(Predicate<? super K> filter, boolean fetchValue, boolean fetchMetadata)
Deprecated.Publishes all entries from this store.void
init(InitializationContext initializationContext)
Deprecated.Used to initialize a cache loader.boolean
isAvailable()
Deprecated.MarshallableEntry<K,V>
loadEntry(Object key)
Deprecated.Fetches an entry from the storage.io.reactivex.rxjava3.core.Flowable<K>
publishKeys(Predicate<? super K> filter)
Deprecated.Publishes all the keys from this store.void
purge(Executor executor, AdvancedCacheWriter.PurgeListener<? super K> purgeListener)
Deprecated.Using the thread in the pool, removed all the expired data from the persistence storage.int
size()
Deprecated.Returns the number of elements in the store.void
start()
Deprecated.Invoked on component startvoid
stop()
Deprecated.Invoked on component stopvoid
write(MarshallableEntry<? extends K,? extends V> entry)
Deprecated.Persists the entry to the storage.-
Methods inherited from interface org.infinispan.persistence.spi.CacheWriter
bulkUpdate, deleteBatch
-
Methods inherited from interface org.infinispan.persistence.spi.ExternalStore
destroy
-
-
-
-
Method Detail
-
init
public void init(InitializationContext initializationContext)
Deprecated.Description copied from interface:CacheLoader
Used to initialize a cache loader. Typically invoked by thePersistenceManager
when setting up cache loaders.- Specified by:
init
in interfaceCacheLoader<K,V>
- Specified by:
init
in interfaceCacheWriter<K,V>
-
start
public void start()
Deprecated.Description copied from interface:Lifecycle
Invoked on component start
-
stop
public void stop()
Deprecated.Description copied from interface:Lifecycle
Invoked on component stop
-
isAvailable
public boolean isAvailable()
Deprecated.- Specified by:
isAvailable
in interfaceCacheLoader<K,V>
- Specified by:
isAvailable
in interfaceCacheWriter<K,V>
- Specified by:
isAvailable
in interfaceExternalStore<K,V>
- Returns:
- true if the writer can be connected to, otherwise false
-
write
public void write(MarshallableEntry<? extends K,? extends V> entry)
Deprecated.Description copied from interface:CacheWriter
Persists the entry to the storage.- Specified by:
write
in interfaceCacheWriter<K,V>
- See Also:
MarshallableEntry
-
clear
public void clear()
Deprecated.Description copied from interface:AdvancedCacheWriter
Removes all the data from the storage.- Specified by:
clear
in interfaceAdvancedCacheWriter<K,V>
-
delete
public boolean delete(Object key)
Deprecated.- Specified by:
delete
in interfaceCacheWriter<K,V>
- Returns:
- true if the entry existed in the persistent store and it was deleted.
-
loadEntry
public MarshallableEntry<K,V> loadEntry(Object key)
Deprecated.Description copied from interface:CacheLoader
Fetches an entry from the storage. If aMarshallableEntry
needs to be created here,InitializationContext.getMarshallableEntryFactory()
()} andInitializationContext.getByteBufferFactory()
should be used.- Specified by:
loadEntry
in interfaceCacheLoader<K,V>
- Returns:
- the entry, or null if the entry does not exist
-
publishKeys
public io.reactivex.rxjava3.core.Flowable<K> publishKeys(Predicate<? super K> filter)
Deprecated.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 - null is treated as allowing all entries- Returns:
- a publisher that will provide the keys from the store
-
entryPublisher
public io.reactivex.rxjava3.core.Flowable<MarshallableEntry<K,V>> entryPublisher(Predicate<? super K> filter, boolean fetchValue, boolean fetchMetadata)
Deprecated.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:
entryPublisher
in interfaceAdvancedCacheLoader<K,V>
- Parameters:
filter
- a filter - null is treated as allowing all entriesfetchValue
- whether or not to fetch the value from the persistent store. E.g. if the iteration is intended only over the key set, no point fetching the values from the persistent store as wellfetchMetadata
- whether or not to fetch the metadata from the persistent store. E.g. if the iteration is intended only ove the key set, then no point fetching the metadata from the persistent store as well- Returns:
- a publisher that will provide the entries from the store
-
purge
public void purge(Executor executor, AdvancedCacheWriter.PurgeListener<? super K> purgeListener)
Deprecated.Description copied from interface:AdvancedCacheWriter
Using the thread in the pool, removed all the expired data from the persistence storage. For each removed entry, the supplied listener is invoked.When this method returns all entries will be purged and no tasks will be running due to this loader in the provided executor. If however an exception is thrown there could be tasks still pending or running in the executor.
- Specified by:
purge
in interfaceAdvancedCacheWriter<K,V>
-
size
public int size()
Deprecated.Description copied from interface:AdvancedCacheLoader
Returns the number of elements in the store.- Specified by:
size
in interfaceAdvancedCacheLoader<K,V>
-
contains
public boolean contains(Object o)
Deprecated.Description copied from interface:CacheLoader
Returns true if the storage contains an entry associated with the given key.- Specified by:
contains
in interfaceCacheLoader<K,V>
-
-