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, PersistenceMarshaller marshaller, org.infinispan.commons.time.TimeService timeService, ByteBufferFactory byteBufferFactory, org.infinispan.marshall.core.MarshalledEntryFactory marshalledEntryFactory, MarshallableEntryFactory marshallableEntryFactory, ExecutorService executorService, GlobalConfiguration globalConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufferFactory
getByteBufferFactory()
To be used for buildingByteBuffer
objects.Cache
getCache()
StoreConfiguration
getConfiguration()
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.org.infinispan.marshall.core.MarshalledEntryFactory
getMarshalledEntryFactory()
To be used for buildingMarshalledEntry
objects.StreamingMarshaller
getMarshaller()
Returns a wrapped version ofInitializationContext.getPersistenceMarshaller()
, which delegates allObjectOutput
andObjectInput
calls to the underlying marshaller.PersistenceMarshaller
getPersistenceMarshaller()
Returns the persistence marshaller which should be used to marshall/unmarshall all stored bytes.org.infinispan.commons.time.TimeService
getTimeService()
-
-
-
Constructor Detail
-
InitializationContextImpl
public InitializationContextImpl(StoreConfiguration configuration, Cache cache, KeyPartitioner keyPartitioner, PersistenceMarshaller marshaller, org.infinispan.commons.time.TimeService timeService, ByteBufferFactory byteBufferFactory, org.infinispan.marshall.core.MarshalledEntryFactory marshalledEntryFactory, MarshallableEntryFactory marshallableEntryFactory, ExecutorService executorService, GlobalConfiguration globalConfiguration)
-
-
Method Detail
-
getConfiguration
public StoreConfiguration 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
-
getMarshaller
public StreamingMarshaller getMarshaller()
Description copied from interface:InitializationContext
Returns a wrapped version ofInitializationContext.getPersistenceMarshaller()
, which delegates allObjectOutput
andObjectInput
calls to the underlying marshaller. Note, calls toDataInput.readLine()
on the returnedObjectInput
instance will throw aUnsupportedOperationException
.- Specified by:
getMarshaller
in interfaceInitializationContext
-
getTimeService
public org.infinispan.commons.time.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
-
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
-
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
-
getMarshalledEntryFactory
public org.infinispan.marshall.core.MarshalledEntryFactory getMarshalledEntryFactory()
Description copied from interface:InitializationContext
To be used for buildingMarshalledEntry
objects.- Specified by:
getMarshalledEntryFactory
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
-
-