Package org.infinispan.persistence.spi
Interface CacheWriter<K,V>
- 
- All Superinterfaces:
- Lifecycle
 - All Known Subinterfaces:
- AdvancedCacheExpirationWriter<K,V>,- AdvancedCacheWriter<K,V>,- AdvancedLoadWriteStore<K,V>,- ExternalStore<K,V>,- FlagAffectedStore<K,V>,- SegmentedAdvancedLoadWriteStore<K,V>,- TransactionalCacheWriter<K,V>
 - All Known Implementing Classes:
- JdbcStringBasedStore,- JpaStore,- RemoteStore,- RestStore,- SingleFileStore,- SoftIndexFileStore
 
 @ThreadSafe @Deprecated public interface CacheWriter<K,V> extends Lifecycle Deprecated.since 11.0 replaced byNonBlockingStoreAllows persisting data to an external storage, as opposed to theCacheLoader.- Since:
- 6.0
- Author:
- Mircea Markus
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default CompletionStage<Void>bulkUpdate(org.reactivestreams.Publisher<MarshallableEntry<? extends K,? extends V>> publisher)Deprecated.Persist all provided entries to the store in chunks, with the size of each chunk determined by the store implementation.booleandelete(Object key)Deprecated.default voiddeleteBatch(Iterable<Object> keys)Deprecated.Remove all provided keys from the store in a single batch operation.voidinit(InitializationContext ctx)Deprecated.Used to initialize a cache loader.default booleanisAvailable()Deprecated.voidwrite(MarshallableEntry<? extends K,? extends V> entry)Deprecated.Persists the entry to the storage.
 
- 
- 
- 
Method Detail- 
initvoid init(InitializationContext ctx) Deprecated.Used to initialize a cache loader. Typically invoked by thePersistenceManagerwhen setting up cache loaders.- Throws:
- PersistenceException- in case of an error, e.g. communicating with the external storage
 
 - 
writevoid write(MarshallableEntry<? extends K,? extends V> entry) Deprecated.Persists the entry to the storage.- Throws:
- PersistenceException- in case of an error, e.g. communicating with the external storage
- See Also:
- MarshallableEntry
 
 - 
deleteboolean delete(Object key) Deprecated.- Returns:
- true if the entry existed in the persistent store and it was deleted.
- Throws:
- PersistenceException- in case of an error, e.g. communicating with the external storage
 
 - 
bulkUpdatedefault CompletionStage<Void> bulkUpdate(org.reactivestreams.Publisher<MarshallableEntry<? extends K,? extends V>> publisher) Deprecated.Persist all provided entries to the store in chunks, with the size of each chunk determined by the store implementation. If chunking is not supported by the underlying store, then entries are written to the store individually viawrite(MarshallableEntry).- Parameters:
- publisher- a- Publisherof- MarshallableEntryinstances
- Throws:
- NullPointerException- if the publisher is null.
 
 - 
deleteBatchdefault void deleteBatch(Iterable<Object> keys) Deprecated.Remove all provided keys from the store in a single batch operation. If this is not supported by the underlying store, then keys are removed from the store individually viadelete(Object).- Parameters:
- keys- an Iterable of entry Keys to be removed from the store.
- Throws:
- NullPointerException- if keys is null.
 
 - 
isAvailabledefault boolean isAvailable() Deprecated.- Returns:
- true if the writer can be connected to, otherwise false
 
 
- 
 
-