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
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Returns true if the storage contains an entry associated with the given key.final boolean
protected abstract ToIntFunction<Object>
final MarshallableEntry<K,
V> Fetches an entry from the storage.final void
write
(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, wait
Methods inherited from interface org.infinispan.persistence.spi.AdvancedCacheExpirationWriter
purge
Methods inherited from interface org.infinispan.persistence.spi.AdvancedCacheLoader
entryPublisher, publishKeys, size
Methods inherited from interface org.infinispan.persistence.spi.AdvancedCacheWriter
clear
Methods inherited from interface org.infinispan.persistence.spi.CacheLoader
init
Methods inherited from interface org.infinispan.persistence.spi.CacheWriter
bulkUpdate, deleteBatch, init, isAvailable
Methods inherited from interface org.infinispan.persistence.spi.ExternalStore
destroy, isAvailable
Methods 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: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
-
contains
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>
-
write
Description copied from interface:CacheWriter
Persists the entry to the storage.- Specified by:
write
in interfaceCacheWriter<K,
V> - See Also:
-
delete
- Specified by:
delete
in interfaceCacheWriter<K,
V> - Returns:
- true if the entry existed in the persistent store and it was deleted.
-