Package org.infinispan.persistence.spi
Interface InitializationContext
-
- All Known Implementing Classes:
InitializationContextImpl
@ThreadSafe public interface InitializationContextAggregates the initialisation state needed by either aCacheLoaderor aCacheWriter.- Since:
- 6.0
- Author:
- Mircea Markus
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description org.infinispan.util.concurrent.BlockingManagergetBlockingManager()Returns a manager that is designed to execute tasks that may block.ByteBufferFactorygetByteBufferFactory()To be used for buildingByteBufferobjects.CachegetCache()<T extends StoreConfiguration>
TgetConfiguration()ExecutorServicegetExecutor()Deprecated.since 11.0 - Please usegetBlockingManager()()} orgetNonBlockingExecutor()insteadGlobalConfigurationgetGlobalConfiguration()Returns the global configurationKeyPartitionergetKeyPartitioner()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 allMarshallableEntryobjects.ExecutorgetNonBlockingExecutor()Returns an executor that Infinispan uses internally for non blocking tasks.PersistenceMarshallergetPersistenceMarshaller()Returns the persistence marshaller which should be used to marshall/unmarshall all stored bytes.org.infinispan.commons.time.TimeServicegetTimeService()
-
-
-
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
-
getTimeService
org.infinispan.commons.time.TimeService getTimeService()
-
getByteBufferFactory
ByteBufferFactory getByteBufferFactory()
To be used for buildingByteBufferobjects.
-
getExecutor
@Deprecated ExecutorService getExecutor()
Deprecated.since 11.0 - Please usegetBlockingManager()()} orgetNonBlockingExecutor()insteadReturns 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
-
getNonBlockingExecutor
Executor getNonBlockingExecutor()
Returns an executor that Infinispan uses internally for non blocking tasks. The user must guarantee tasks submitted to this executor will not block the thread it is ran on. Failure to do so can slow down Infinispan's handling of operations as these threads are limited to the number of cores and are used extensively.- Returns:
- an executor that can be used to submit tasks that will not block the thread it runs on
-
getBlockingManager
org.infinispan.util.concurrent.BlockingManager getBlockingManager()
Returns a manager that is designed to execute tasks that may block. This manager ensures that only the blocking portion is ran on a blocking thread and any stage is continued on a non blocking thread.- Returns:
- a manager that should be used to execute blocking operations
-
getMarshallableEntryFactory
<K,V> MarshallableEntryFactory<K,V> getMarshallableEntryFactory()
Should be used to build allMarshallableEntryobjects.
-
getPersistenceMarshaller
PersistenceMarshaller getPersistenceMarshaller()
Returns the persistence marshaller which should be used to marshall/unmarshall all stored bytes.
-
getGlobalConfiguration
GlobalConfiguration getGlobalConfiguration()
Returns the global configuration
-
-