Class AbstractSegmentedAdvancedLoadWriteStore<K,V>
java.lang.Object
org.infinispan.persistence.support.AbstractSegmentedAdvancedLoadWriteStore<K,V>
- All Implemented Interfaces:
Lifecycle,AdvancedCacheExpirationWriter<K,,V> AdvancedCacheLoader<K,,V> AdvancedCacheWriter<K,,V> AdvancedLoadWriteStore<K,,V> CacheLoader<K,,V> CacheWriter<K,,V> ExternalStore<K,,V> SegmentedAdvancedLoadWriteStore<K,V>
- Direct Known Subclasses:
ComposedSegmentedLoadWriteStore
public abstract class AbstractSegmentedAdvancedLoadWriteStore<K,V>
extends Object
implements SegmentedAdvancedLoadWriteStore<K,V>
Abstract segment loader writer that implements all the single key non segmented methods by invoking the segmented
equivalent by passing in the segment returned from invoking
getKeyMapper(). These methods are also all
declared final as to make sure the end user does not implement the incorrect method. All other methods must be
implemented as normal.- Since:
- 9.4
- Author:
- wburns
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.persistence.spi.AdvancedCacheExpirationWriter
AdvancedCacheExpirationWriter.ExpirationPurgeListener<K,V> Nested classes/interfaces inherited from interface org.infinispan.persistence.spi.AdvancedCacheWriter
AdvancedCacheWriter.PurgeListener<K> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanReturns true if the storage contains an entry associated with the given key.final booleanprotected abstract ToIntFunction<Object>final MarshallableEntry<K,V> Fetches an entry from the storage.final voidwrite(MarshallableEntry<? extends K, ? extends V> entry) Persists the entry to the storage.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.persistence.spi.AdvancedCacheExpirationWriter
purgeMethods inherited from interface org.infinispan.persistence.spi.AdvancedCacheLoader
entryPublisher, publishKeys, sizeMethods inherited from interface org.infinispan.persistence.spi.AdvancedCacheWriter
clearMethods inherited from interface org.infinispan.persistence.spi.CacheLoader
initMethods inherited from interface org.infinispan.persistence.spi.CacheWriter
bulkUpdate, deleteBatch, init, isAvailableMethods inherited from interface org.infinispan.persistence.spi.ExternalStore
destroy, isAvailableMethods inherited from interface org.infinispan.persistence.spi.SegmentedAdvancedLoadWriteStore
addSegments, clear, contains, delete, entryPublisher, get, publishKeys, purge, removeSegments, size, write
-
Constructor Details
-
AbstractSegmentedAdvancedLoadWriteStore
public AbstractSegmentedAdvancedLoadWriteStore()
-
-
Method Details
-
getKeyMapper
-
loadEntry
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
-
contains
Description copied from interface:CacheLoaderReturns true if the storage contains an entry associated with the given key.- Specified by:
containsin interfaceCacheLoader<K,V>
-
write
Description copied from interface:CacheWriterPersists the entry to the storage.- Specified by:
writein interfaceCacheWriter<K,V> - See Also:
-
delete
- Specified by:
deletein interfaceCacheWriter<K,V> - Returns:
- true if the entry existed in the persistent store and it was deleted.
-