Package org.infinispan.persistence
Class InitializationContextImpl
- java.lang.Object
-
- org.infinispan.persistence.InitializationContextImpl
-
- All Implemented Interfaces:
InitializationContext
public class InitializationContextImpl extends Object implements InitializationContext
- Since:
- 6.0
- Author:
- Mircea Markus
-
-
Constructor Summary
Constructors Constructor Description InitializationContextImpl(StoreConfiguration configuration, Cache cache, KeyPartitioner keyPartitioner, StreamingMarshaller marshaller, TimeService timeService, ByteBufferFactory byteBufferFactory, MarshalledEntryFactory mef, ExecutorService executorService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufferFactorygetByteBufferFactory()To be used for buildingByteBufferobjects.CachegetCache()StoreConfigurationgetConfiguration()ExecutorServicegetExecutor()Returns the preferred executor to be used by stores if needed.KeyPartitionergetKeyPartitioner()The configured partitioner that can be used to determine which segment a given key belongs to.MarshalledEntryFactorygetMarshalledEntryFactory()To be used for buildingMarshalledEntryobjects.StreamingMarshallergetMarshaller()TimeServicegetTimeService()
-
-
-
Constructor Detail
-
InitializationContextImpl
public InitializationContextImpl(StoreConfiguration configuration, Cache cache, KeyPartitioner keyPartitioner, StreamingMarshaller marshaller, TimeService timeService, ByteBufferFactory byteBufferFactory, MarshalledEntryFactory mef, ExecutorService executorService)
-
-
Method Detail
-
getConfiguration
public StoreConfiguration getConfiguration()
- Specified by:
getConfigurationin interfaceInitializationContext
-
getCache
public Cache getCache()
- Specified by:
getCachein interfaceInitializationContext
-
getKeyPartitioner
public KeyPartitioner 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
-
getMarshaller
public StreamingMarshaller getMarshaller()
- Specified by:
getMarshallerin interfaceInitializationContext
-
getTimeService
public TimeService getTimeService()
- Specified by:
getTimeServicein interfaceInitializationContext
-
getByteBufferFactory
public ByteBufferFactory getByteBufferFactory()
Description copied from interface:InitializationContextTo be used for buildingByteBufferobjects.- Specified by:
getByteBufferFactoryin interfaceInitializationContext
-
getMarshalledEntryFactory
public MarshalledEntryFactory getMarshalledEntryFactory()
Description copied from interface:InitializationContextTo be used for buildingMarshalledEntryobjects.- Specified by:
getMarshalledEntryFactoryin interfaceInitializationContext
-
getExecutor
public ExecutorService getExecutor()
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
-
-