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
- only matching record-stores with this predicate will 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)
void removeWbqCountersFromMatchingPartitionsWith(Predicate<RecordStore> predicate, int partitionId)
predicate
- only matching record-stores
with this predicate will be removedpartitionId
- partition IDMapService 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)
PartitionIdSet getOwnedPartitions()
void reloadOwnedPartitions()
ExpirationManager getExpirationManager()
void setService(MapService mapService)
NodeEngine getNodeEngine()
MapEventPublisher getMapEventPublisher()
MapEventJournal getEventJournal()
QueryEngine getQueryEngine(String name)
QueryRunner getMapQueryRunner(String name)
QueryOptimizer getQueryOptimizer()
LocalMapStatsProvider getLocalMapStatsProvider()
MapClearExpiredRecordsTask getClearExpiredRecordsTask()
MapOperationProvider getMapOperationProvider(String mapName)
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)
ResultProcessorRegistry getResultProcessorRegistry()
MapNearCacheManager getMapNearCacheManager()
QueryCacheContext getQueryCacheContext()
UUID addListenerAdapter(ListenerAdapter listenerAdaptor, EventFilter eventFilter, String mapName)
UUID 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)
NodeWideUsedCapacityCounter getNodeWideUsedCapacityCounter()
Copyright © 2019 Hazelcast, Inc.. All rights reserved.