Package org.infinispan.persistence.spi
Interface CacheLoader<K,V>
- All Superinterfaces:
Lifecycle
- All Known Subinterfaces:
AdvancedCacheLoader<K,,V> AdvancedLoadWriteStore<K,,V> ExternalStore<K,,V> FlagAffectedStore<K,,V> SegmentedAdvancedLoadWriteStore<K,V>
- All Known Implementing Classes:
ClusterLoader
Deprecated.
Defines the logic for loading data from an external storage. The writing of data is optional and coordinated through
a
CacheWriter.- Since:
- 6.0
- Author:
- Mircea Markus
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Returns true if the storage contains an entry associated with the given key.voidDeprecated.Used to initialize a cache loader.default booleanDeprecated.Deprecated.Fetches an entry from the storage.
-
Method Details
-
init
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
-
loadEntry
Deprecated.Fetches an entry from the storage. If aMarshallableEntryneeds to be created here,InitializationContext.getMarshallableEntryFactory()()} andInitializationContext.getByteBufferFactory()should be used.- Returns:
- the entry, or null if the entry does not exist
- Throws:
PersistenceException- in case of an error, e.g. communicating with the external storage
-
contains
Deprecated.Returns true if the storage contains an entry associated with the given key.- Throws:
PersistenceException- in case of an error, e.g. communicating with the external storage
-
isAvailable
default boolean isAvailable()Deprecated.- Returns:
- true if the writer can be connected to, otherwise false
-
NonBlockingStore