Package org.infinispan.persistence
Class InitializationContextImpl
java.lang.Object
org.infinispan.persistence.InitializationContextImpl
- All Implemented Interfaces:
InitializationContext
- Since:
- 6.0
- Author:
- Mircea Markus
-
Constructor Summary
ConstructorsConstructorDescriptionInitializationContextImpl(StoreConfiguration configuration, Cache cache, KeyPartitioner keyPartitioner, PersistenceMarshaller marshaller, TimeService timeService, ByteBufferFactory byteBufferFactory, MarshallableEntryFactory marshallableEntryFactory, Executor nonBlockingExecutor, GlobalConfiguration globalConfiguration, BlockingManager blockingManager, NonBlockingManager nonBlockingManager) -
Method Summary
Modifier and TypeMethodDescriptionReturns a manager that is designed to execute tasks that might block.To be used for buildingByteBufferobjects.getCache()Deprecated, for removal: This API element is subject to removal in a future version.Returns the global configurationThe configured partitioner that can be used to determine which segment a given key belongs to.<K,V> MarshallableEntryFactory<K, V> Should be used to build allMarshallableEntryobjects.Returns an executor for non-blocking tasks.Returns a manager that is designed to help with non blocking operations.Returns the persistence marshaller which should be used to marshall/unmarshall all stored bytes.
-
Constructor Details
-
InitializationContextImpl
public InitializationContextImpl(StoreConfiguration configuration, Cache cache, KeyPartitioner keyPartitioner, PersistenceMarshaller marshaller, TimeService timeService, ByteBufferFactory byteBufferFactory, MarshallableEntryFactory marshallableEntryFactory, Executor nonBlockingExecutor, GlobalConfiguration globalConfiguration, BlockingManager blockingManager, NonBlockingManager nonBlockingManager)
-
-
Method Details
-
getConfiguration
- Specified by:
getConfigurationin interfaceInitializationContext
-
getCache
- Specified by:
getCachein interfaceInitializationContext
-
getKeyPartitioner
Description copied from interface:InitializationContextThe 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:
getKeyPartitionerin interfaceInitializationContext- Returns:
- partitioner that can provide what segment a key maps to
-
getTimeService
- Specified by:
getTimeServicein interfaceInitializationContext
-
getByteBufferFactory
Description copied from interface:InitializationContextTo be used for buildingByteBufferobjects.- Specified by:
getByteBufferFactoryin interfaceInitializationContext
-
getMarshallableEntryFactory
Description copied from interface:InitializationContextShould be used to build allMarshallableEntryobjects.- Specified by:
getMarshallableEntryFactoryin interfaceInitializationContext
-
getExecutor
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:InitializationContextReturns 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:
getExecutorin interfaceInitializationContext- Returns:
- the executor to be used with stores
-
getNonBlockingExecutor
Description copied from interface:InitializationContextReturns 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:
getNonBlockingExecutorin interfaceInitializationContext- Returns:
- an executor that can submit non-blocking tasks.
-
getBlockingManager
Description copied from interface:InitializationContextReturns 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:
getBlockingManagerin interfaceInitializationContext- Returns:
- a manager that should be used to execute blocking operations.
-
getNonBlockingManager
Description copied from interface:InitializationContextReturns a manager that is designed to help with non blocking operations.- Specified by:
getNonBlockingManagerin interfaceInitializationContext- Returns:
- a manager that can be used to help with offloading non blocking work.
-
getPersistenceMarshaller
Description copied from interface:InitializationContextReturns the persistence marshaller which should be used to marshall/unmarshall all stored bytes.- Specified by:
getPersistenceMarshallerin interfaceInitializationContext
-
getGlobalConfiguration
Description copied from interface:InitializationContextReturns the global configuration- Specified by:
getGlobalConfigurationin interfaceInitializationContext
-