Class DelegatingInitializationContext
- java.lang.Object
-
- org.infinispan.persistence.support.DelegatingInitializationContext
-
- All Implemented Interfaces:
InitializationContext
public abstract class DelegatingInitializationContext extends Object implements InitializationContext
-
-
Constructor Summary
Constructors Constructor Description DelegatingInitializationContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract InitializationContext
delegate()
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()
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.Executor
getNonBlockingExecutor()
Returns an executor for non-blocking tasks.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.TimeService
getTimeService()
-
-
-
Method Detail
-
delegate
public abstract InitializationContext delegate()
-
getConfiguration
public <T extends StoreConfiguration> T getConfiguration()
- Specified by:
getConfiguration
in interfaceInitializationContext
-
getCache
public Cache getCache()
- Specified by:
getCache
in interfaceInitializationContext
-
getKeyPartitioner
public KeyPartitioner getKeyPartitioner()
Description copied from interface:InitializationContext
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
).- Specified by:
getKeyPartitioner
in interfaceInitializationContext
- Returns:
- partitioner that can provide what segment a key maps to
-
getTimeService
public TimeService getTimeService()
- Specified by:
getTimeService
in interfaceInitializationContext
-
getByteBufferFactory
public ByteBufferFactory getByteBufferFactory()
Description copied from interface:InitializationContext
To be used for buildingByteBuffer
objects.- Specified by:
getByteBufferFactory
in interfaceInitializationContext
-
getExecutor
public ExecutorService getExecutor()
Description copied from interface:InitializationContext
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.- Specified by:
getExecutor
in interfaceInitializationContext
- Returns:
- the executor to be used with stores
-
getNonBlockingExecutor
public Executor getNonBlockingExecutor()
Description copied from interface:InitializationContext
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.- Specified by:
getNonBlockingExecutor
in interfaceInitializationContext
- Returns:
- an executor that can submit non-blocking tasks.
-
getBlockingManager
public BlockingManager getBlockingManager()
Description copied from interface:InitializationContext
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.- Specified by:
getBlockingManager
in interfaceInitializationContext
- Returns:
- a manager that should be used to execute blocking operations.
-
getNonBlockingManager
public NonBlockingManager getNonBlockingManager()
Description copied from interface:InitializationContext
Returns a manager that is designed to help with non blocking operations.- Specified by:
getNonBlockingManager
in interfaceInitializationContext
- Returns:
- a manager that can be used to help with offloading non blocking work.
-
getMarshallableEntryFactory
public <K,V> MarshallableEntryFactory<K,V> getMarshallableEntryFactory()
Description copied from interface:InitializationContext
Should be used to build allMarshallableEntry
objects.- Specified by:
getMarshallableEntryFactory
in interfaceInitializationContext
-
getPersistenceMarshaller
public PersistenceMarshaller getPersistenceMarshaller()
Description copied from interface:InitializationContext
Returns the persistence marshaller which should be used to marshall/unmarshall all stored bytes.- Specified by:
getPersistenceMarshaller
in interfaceInitializationContext
-
getGlobalConfiguration
public GlobalConfiguration getGlobalConfiguration()
Description copied from interface:InitializationContext
Returns the global configuration- Specified by:
getGlobalConfiguration
in interfaceInitializationContext
-
-