Package org.infinispan.persistence.spi
Interface InitializationContext
-
- All Known Implementing Classes:
InitializationContextImpl
@ThreadSafe public interface InitializationContext
Aggregates the initialisation state needed by either aCacheLoader
or aCacheWriter
.- Since:
- 6.0
- Author:
- Mircea Markus
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ByteBufferFactory
getByteBufferFactory()
To be used for buildingByteBuffer
objects.Cache
getCache()
<T extends StoreConfiguration>
TgetConfiguration()
java.util.concurrent.ExecutorService
getExecutor()
Returns the preferred executor to be used by stores if needed.GlobalConfiguration
getGlobalConfiguration()
Returns the global configurationKeyPartitioner
getKeyPartitioner()
The configured partitioner that can be used to determine which segment a given key belongs to.<K,V>
MarshallableEntryFactory<K,V>getMarshallableEntryFactory()
Should be used to build allMarshallableEntry
objects.MarshalledEntryFactory
getMarshalledEntryFactory()
Deprecated.since 10.0 please usegetMarshallableEntryFactory()
insteadStreamingMarshaller
getMarshaller()
Deprecated.usegetPersistenceMarshaller()
insteadPersistenceMarshaller
getPersistenceMarshaller()
Returns the persistence marshaller which should be used to marshall/unmarshall all stored bytes.TimeService
getTimeService()
-
-
-
Method Detail
-
getConfiguration
<T extends StoreConfiguration> T getConfiguration()
-
getCache
Cache getCache()
-
getKeyPartitioner
KeyPartitioner getKeyPartitioner()
The configured partitioner that can be used to determine which segment a given key belongs to. This is useful when a store is segmented (ie. implementsSegmentedAdvancedLoadWriteStore
).- Returns:
- partitioner that can provide what segment a key maps to
-
getMarshaller
@Deprecated StreamingMarshaller getMarshaller()
Deprecated.usegetPersistenceMarshaller()
insteadReturns a wrapped version ofgetPersistenceMarshaller()
, which delegates allObjectOutput
andObjectInput
calls to the underlying marshaller. Note, calls toDataInput.readLine()
on the returnedObjectInput
instance will throw aUnsupportedOperationException
.
-
getTimeService
TimeService getTimeService()
-
getByteBufferFactory
ByteBufferFactory getByteBufferFactory()
To be used for buildingByteBuffer
objects.
-
getMarshalledEntryFactory
@Deprecated MarshalledEntryFactory getMarshalledEntryFactory()
Deprecated.since 10.0 please usegetMarshallableEntryFactory()
insteadTo be used for buildingMarshalledEntry
objects.
-
getExecutor
java.util.concurrent.ExecutorService getExecutor()
Returns the preferred executor to be used by stores if needed. Stores normally shouldn't need this unless they *must* perform some blocking code asynchronously.- Returns:
- the executor to be used with stores
-
getMarshallableEntryFactory
<K,V> MarshallableEntryFactory<K,V> getMarshallableEntryFactory()
Should be used to build allMarshallableEntry
objects.
-
getPersistenceMarshaller
PersistenceMarshaller getPersistenceMarshaller()
Returns the persistence marshaller which should be used to marshall/unmarshall all stored bytes.
-
getGlobalConfiguration
GlobalConfiguration getGlobalConfiguration()
Returns the global configuration
-
-