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 implementCacheLoaderRestStore.- 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 voidclear()Deprecated.Removes all the data from the storage.booleancontains(Object o)Deprecated.Returns true if the storage contains an entry associated with the given key.booleandelete(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.voidinit(InitializationContext initializationContext)Deprecated.Used to initialize a cache loader.booleanisAvailable()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.voidpurge(Executor executor, AdvancedCacheWriter.PurgeListener<? super K> purgeListener)Deprecated.Using the thread in the pool, removed all the expired data from the persistence storage.intsize()Deprecated.Returns the number of elements in the store.voidstart()Deprecated.Invoked on component startvoidstop()Deprecated.Invoked on component stopvoidwrite(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:CacheLoaderUsed to initialize a cache loader. Typically invoked by thePersistenceManagerwhen setting up cache loaders.- Specified by:
initin interfaceCacheLoader<K,V>- Specified by:
initin interfaceCacheWriter<K,V>
-
start
public void start()
Deprecated.Description copied from interface:LifecycleInvoked on component start
-
stop
public void stop()
Deprecated.Description copied from interface:LifecycleInvoked on component stop
-
isAvailable
public boolean isAvailable()
Deprecated.- Specified by:
isAvailablein interfaceCacheLoader<K,V>- Specified by:
isAvailablein interfaceCacheWriter<K,V>- Specified by:
isAvailablein 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:CacheWriterPersists the entry to the storage.- Specified by:
writein interfaceCacheWriter<K,V>- See Also:
MarshallableEntry
-
clear
public void clear()
Deprecated.Description copied from interface:AdvancedCacheWriterRemoves all the data from the storage.- Specified by:
clearin interfaceAdvancedCacheWriter<K,V>
-
delete
public boolean delete(Object key)
Deprecated.- Specified by:
deletein 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:CacheLoaderFetches an entry from the storage. If aMarshallableEntryneeds to be created here,InitializationContext.getMarshallableEntryFactory()()} andInitializationContext.getByteBufferFactory()should be used.- Specified by:
loadEntryin 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:AdvancedCacheLoaderPublishes all the keys from this store. The given publisher can be used by as manySubscribers as desired. Keys are not retrieved until a given Subscriber requests them from theSubscription.Stores will return only non expired keys
- Specified by:
publishKeysin 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:AdvancedCacheLoaderPublishes all entries from this store. The given publisher can be used by as manySubscribers 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:
entryPublisherin 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:AdvancedCacheWriterUsing 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:
purgein interfaceAdvancedCacheWriter<K,V>
-
size
public int size()
Deprecated.Description copied from interface:AdvancedCacheLoaderReturns the number of elements in the store.- Specified by:
sizein interfaceAdvancedCacheLoader<K,V>
-
contains
public boolean contains(Object o)
Deprecated.Description copied from interface:CacheLoaderReturns true if the storage contains an entry associated with the given key.- Specified by:
containsin interfaceCacheLoader<K,V>
-
-