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 org.infinispan.util.concurrent.BlockingManager
getBlockingManager()
Returns a manager that is designed to execute tasks that might block.ByteBufferFactory
getByteBufferFactory()
To be used for buildingByteBuffer
objects.Cache
getCache()
<T extends StoreConfiguration>
TgetConfiguration()
ExecutorService
getExecutor()
Deprecated.since 11.0 - Please usegetBlockingManager()
()} orgetNonBlockingExecutor()
insteadGlobalConfiguration
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.Executor
getNonBlockingExecutor()
Returns an executor for non-blocking tasks.org.infinispan.util.concurrent.NonBlockingManager
getNonBlockingManager()
Returns a manager that is designed to help with non blocking operations.PersistenceMarshaller
getPersistenceMarshaller()
Returns the persistence marshaller which should be used to marshall/unmarshall all stored bytes.org.infinispan.commons.time.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
-
getTimeService
org.infinispan.commons.time.TimeService getTimeService()
-
getByteBufferFactory
ByteBufferFactory getByteBufferFactory()
To be used for buildingByteBuffer
objects.
-
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 for non-blocking tasks. Users must guarantee that the tasks they submit to this executor do not block the thread in which the executor runs. Doing so can cause Infinispan to handle operations more slowly, reducing performance, because threads are limited to the number of cores and are used extensively.- Returns:
- an executor that can submit non-blocking tasks.
-
getBlockingManager
org.infinispan.util.concurrent.BlockingManager getBlockingManager()
Returns a manager that is designed to execute tasks that might block. This manager ensures that only the blocking code is run on a blocking thread and any stage continues on a non-blocking thread.- Returns:
- a manager that should be used to execute blocking operations.
-
getNonBlockingManager
org.infinispan.util.concurrent.NonBlockingManager getNonBlockingManager()
Returns a manager that is designed to help with non blocking operations.- Returns:
- a manager that can be used to help with offloading non blocking work.
-
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
-
-