Package org.infinispan.persistence
Class InitializationContextImpl
- java.lang.Object
-
- org.infinispan.persistence.InitializationContextImpl
-
- All Implemented Interfaces:
InitializationContext
public class InitializationContextImpl extends java.lang.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, java.util.concurrent.ExecutorService executorService, GlobalConfiguration globalConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufferFactorygetByteBufferFactory()To be used for buildingByteBufferobjects.CachegetCache()StoreConfigurationgetConfiguration()java.util.concurrent.ExecutorServicegetExecutor()Returns the preferred executor to be used by stores if needed.GlobalConfigurationgetGlobalConfiguration()Returns the global configurationKeyPartitionergetKeyPartitioner()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 allMarshallableEntryobjects.org.infinispan.marshall.core.MarshalledEntryFactorygetMarshalledEntryFactory()To be used for buildingMarshalledEntryobjects.StreamingMarshallergetMarshaller()Returns a wrapped version ofInitializationContext.getPersistenceMarshaller(), which delegates allObjectOutputandObjectInputcalls to the underlying marshaller.PersistenceMarshallergetPersistenceMarshaller()Returns the persistence marshaller which should be used to marshall/unmarshall all stored bytes.org.infinispan.commons.time.TimeServicegetTimeService()
-
-
-
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, java.util.concurrent.ExecutorService executorService, GlobalConfiguration globalConfiguration)
-
-
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()
Description copied from interface:InitializationContextReturns a wrapped version ofInitializationContext.getPersistenceMarshaller(), which delegates allObjectOutputandObjectInputcalls to the underlying marshaller. Note, calls toDataInput.readLine()on the returnedObjectInputinstance will throw aUnsupportedOperationException.- Specified by:
getMarshallerin interfaceInitializationContext
-
getTimeService
public org.infinispan.commons.time.TimeService getTimeService()
- Specified by:
getTimeServicein interfaceInitializationContext
-
getByteBufferFactory
public ByteBufferFactory getByteBufferFactory()
Description copied from interface:InitializationContextTo be used for buildingByteBufferobjects.- Specified by:
getByteBufferFactoryin interfaceInitializationContext
-
getMarshallableEntryFactory
public <K,V> MarshallableEntryFactory<K,V> getMarshallableEntryFactory()
Description copied from interface:InitializationContextShould be used to build allMarshallableEntryobjects.- Specified by:
getMarshallableEntryFactoryin interfaceInitializationContext
-
getExecutor
public java.util.concurrent.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
-
getMarshalledEntryFactory
public org.infinispan.marshall.core.MarshalledEntryFactory getMarshalledEntryFactory()
Description copied from interface:InitializationContextTo be used for buildingMarshalledEntryobjects.- Specified by:
getMarshalledEntryFactoryin interfaceInitializationContext
-
getPersistenceMarshaller
public PersistenceMarshaller getPersistenceMarshaller()
Description copied from interface:InitializationContextReturns the persistence marshaller which should be used to marshall/unmarshall all stored bytes.- Specified by:
getPersistenceMarshallerin interfaceInitializationContext
-
getGlobalConfiguration
public GlobalConfiguration getGlobalConfiguration()
Description copied from interface:InitializationContextReturns the global configuration- Specified by:
getGlobalConfigurationin interfaceInitializationContext
-
-