public interface MapServiceContext extends MapServiceContextInterceptorSupport, MapServiceContextEventListenerSupport
Shared instances, configurations of all maps can be reached over this context.
Also this context provides some support methods which are used in map operations and RecordStore
implementations.
For example all PartitionContainer
and MapContainer
instances
can also be reached by using this interface.
It is also responsible for providing methods which are used by lower layers of
Hazelcast and exposed on MapService
.
MapManagedService
addInterceptor, generateInterceptorId, hasInterceptor, interceptAfterGet, interceptAfterPut, interceptAfterRemove, interceptGet, interceptPut, interceptRemove, removeInterceptor
addEventListener, addLocalEventListener, addLocalEventListener, addLocalPartitionLostListener, addPartitionLostListener, removeEventListener, removePartitionLostListener
Data toData(Object object, PartitioningStrategy partitionStrategy)
MapContainer getMapContainer(String mapName)
Map<String,MapContainer> getMapContainers()
PartitionContainer getPartitionContainer(int partitionId)
void initPartitionsContainers()
void removeRecordStoresFromPartitionMatchingWith(Predicate<RecordStore> predicate, int partitionId, boolean onShutdown, boolean onRecordStoreDestroy)
predicate
- to find partitions to be removedpartitionId
- partition IDonShutdown
- true
if this method is called during map service shutdown,
otherwise set false
onRecordStoreDestroy
- true
if this method is called during to destroy record store,
otherwise set false
MapManagedService.reset()
,
MapManagedService.shutdown(boolean)
MapService getService()
void destroyMapStores()
void flushMaps()
void destroyMap(String mapName)
void reset()
void shutdown()
RecordStore createRecordStore(MapContainer mapContainer, int partitionId, MapKeyLoader keyLoader)
RecordStore getRecordStore(int partitionId, String mapName)
RecordStore getRecordStore(int partitionId, String mapName, boolean skipLoadingOnCreate)
RecordStore getExistingRecordStore(int partitionId, String mapName)
Collection<Integer> getOwnedPartitions()
void reloadOwnedPartitions()
AtomicInteger getWriteBehindQueueItemCounter()
ExpirationManager getExpirationManager()
void setService(MapService mapService)
NodeEngine getNodeEngine()
MergePolicyProvider getMergePolicyProvider()
MapEventPublisher getMapEventPublisher()
MapEventJournal getEventJournal()
QueryEngine getQueryEngine(String name)
QueryRunner getMapQueryRunner(String name)
QueryOptimizer getQueryOptimizer()
LocalMapStatsProvider getLocalMapStatsProvider()
MapClearExpiredRecordsTask getClearExpiredRecordsTask()
MapOperationProvider getMapOperationProvider(String name)
MapOperationProvider getMapOperationProvider(MapConfig mapConfig)
IndexProvider getIndexProvider(MapConfig mapConfig)
Extractors getExtractors(String mapName)
void incrementOperationStats(long startTime, LocalMapStatsImpl localMapStats, String mapName, Operation operation)
boolean removeMapContainer(MapContainer mapContainer)
PartitioningStrategy getPartitioningStrategy(String mapName, PartitioningStrategyConfig config)
void removePartitioningStrategyFromCache(String mapName)
PartitionContainer[] getPartitionContainers()
void onClusterStateChange(ClusterState newState)
PartitionScanRunner getPartitionScanRunner()
ResultProcessorRegistry getResultProcessorRegistry()
MapNearCacheManager getMapNearCacheManager()
QueryCacheContext getQueryCacheContext()
String addListenerAdapter(ListenerAdapter listenerAdaptor, EventFilter eventFilter, String mapName)
String addLocalListenerAdapter(ListenerAdapter listenerAdaptor, String mapName)
IndexCopyBehavior getIndexCopyBehavior()
Collection<RecordStoreMutationObserver<Record>> createRecordStoreMutationObservers(String mapName, int partitionId)
RecordStoreMutationObserver
s
for the given map's partition that need to be added in record
store construction time in order to ensure no RecordStore
mutations are missed.mapName
- The name of the mappartitionId
- The partitionValueComparator getValueComparatorOf(InMemoryFormat inMemoryFormat)
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.