CacheLoader@ThreadSafe public class RestStore<K,V> extends java.lang.Object implements AdvancedLoadWriteStore<K,V>
AdvancedCacheLoader.CacheLoaderTask<K,V>, AdvancedCacheLoader.TaskContextAdvancedCacheWriter.PurgeListener<K>| Constructor and Description |
|---|
RestStore()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Deprecated.
Removes all the data from the storage.
|
boolean |
contains(java.lang.Object o)
Deprecated.
Returns true if the storage contains an entry associated with the given key.
|
boolean |
delete(java.lang.Object key)
Deprecated.
|
io.reactivex.Flowable<MarshallableEntry<K,V>> |
entryPublisher(java.util.function.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(java.lang.Object key)
Deprecated.
Fetches an entry from the storage.
|
io.reactivex.Flowable<K> |
publishKeys(java.util.function.Predicate<? super K> filter)
Deprecated.
Publishes all the keys from this store.
|
void |
purge(java.util.concurrent.Executor executor,
AdvancedCacheWriter.PurgeListener purgeListener)
Deprecated.
Using the thread in the pool, removed all the expired data from the persistence storage.
|
void |
setInternalCacheEntryFactory(InternalEntryFactory iceFactory)
Deprecated.
|
int |
size()
Deprecated.
Returns the number of elements in the store.
|
void |
start()
Deprecated.
Invoked on component start
|
void |
stop()
Deprecated.
Invoked on component stop
|
void |
write(MarshallableEntry entry)
Deprecated.
Persists the entry to the storage.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroyprocess, publishEntriesloadbulkUpdate, deleteBatch, write, writeBatchpublic void init(InitializationContext initializationContext)
CacheLoaderPersistenceManager
when setting up cache loaders.init in interface CacheLoader<K,V>init in interface CacheWriter<K,V>public void start()
Lifecyclepublic void stop()
Lifecyclepublic boolean isAvailable()
isAvailable in interface CacheLoader<K,V>isAvailable in interface CacheWriter<K,V>isAvailable in interface ExternalStore<K,V>public void setInternalCacheEntryFactory(InternalEntryFactory iceFactory)
public void write(MarshallableEntry entry)
CacheWriterwrite in interface CacheWriter<K,V>MarshallableEntrypublic void clear()
AdvancedCacheWriterclear in interface AdvancedCacheWriter<K,V>public boolean delete(java.lang.Object key)
delete in interface CacheWriter<K,V>public MarshallableEntry<K,V> loadEntry(java.lang.Object key)
CacheLoaderMarshallableEntry needs to be created here, InitializationContext.getMarshallableEntryFactory() ()} and InitializationContext.getByteBufferFactory() should be used.loadEntry in interface CacheLoader<K,V>public io.reactivex.Flowable<K> publishKeys(java.util.function.Predicate<? super K> filter)
AdvancedCacheLoaderSubscribers as desired. Keys are not retrieved until a given Subscriber requests
them from the Subscription.
Stores will return only non expired keys
publishKeys in interface AdvancedCacheLoader<K,V>filter - a filter - null is treated as allowing all entriespublic io.reactivex.Flowable<MarshallableEntry<K,V>> entryPublisher(java.util.function.Predicate<? super K> filter, boolean fetchValue, boolean fetchMetadata)
AdvancedCacheLoaderSubscribers as desired. Entries are not retrieved until a given Subscriber requests
them from the Subscription.
If fetchMetadata is true this store must guarantee to not return any expired entries.
entryPublisher in interface AdvancedCacheLoader<K,V>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 wellpublic void purge(java.util.concurrent.Executor executor,
AdvancedCacheWriter.PurgeListener purgeListener)
AdvancedCacheWriterWhen 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.
purge in interface AdvancedCacheWriter<K,V>public int size()
AdvancedCacheLoadersize in interface AdvancedCacheLoader<K,V>public boolean contains(java.lang.Object o)
CacheLoadercontains in interface CacheLoader<K,V>