com.hazelcast.map.impl
Interface MapServiceContext

All Superinterfaces:
MapServiceContextEventListenerSupport, MapServiceContextInterceptorSupport
All Known Implementing Classes:
DefaultMapServiceContext

public interface MapServiceContext
extends MapServiceContextInterceptorSupport, MapServiceContextEventListenerSupport

Context which is needed by a map service.

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.

See Also:
MapManagedService

Method Summary
 void clearPartitionData(int partitionId)
           
 void clearPartitions()
           
 boolean compare(String mapName, Object value1, Object value2)
           
 void destroyMap(String mapName)
           
 void destroyMapStores()
           
 void flushMaps()
           
 EvictionOperator getEvictionOperator()
           
 RecordStore getExistingRecordStore(int partitionId, String mapName)
           
 ExpirationManager getExpirationManager()
           
 LocalMapStatsProvider getLocalMapStatsProvider()
           
 MapContainer getMapContainer(String mapName)
           
 Map<String,MapContainer> getMapContainers()
           
 MapContextQuerySupport getMapContextQuerySupport()
           
 MapEventPublisher getMapEventPublisher()
           
 MergePolicyProvider getMergePolicyProvider()
           
 NearCacheProvider getNearCacheProvider()
           
 NodeEngine getNodeEngine()
           
 long getNow()
           
 Collection<Integer> getOwnedPartitions()
           
 PartitionContainer getPartitionContainer(int partitionId)
           
 RecordStore getRecordStore(int partitionId, String mapName)
           
 MapService getService()
           
 AtomicInteger getWriteBehindQueueItemCounter()
           
 void initPartitionsContainers()
           
 boolean isOwnedKey(Data key)
          Check if key belongs on partitions of the this node
 void reloadOwnedPartitions()
           
 void reset()
           
 String serviceName()
           
 void setService(MapService mapService)
           
 Data toData(Object object)
           
 Data toData(Object object, PartitioningStrategy partitionStrategy)
           
 Object toObject(Object data)
           
 
Methods inherited from interface com.hazelcast.map.impl.MapServiceContextInterceptorSupport
addInterceptor, interceptAfterGet, interceptAfterPut, interceptAfterRemove, interceptGet, interceptPut, interceptRemove, removeInterceptor
 
Methods inherited from interface com.hazelcast.map.impl.MapServiceContextEventListenerSupport
addEventListener, addLocalEventListener, addLocalEventListener, hasRegisteredListener, removeEventListener
 

Method Detail

getMapContainer

MapContainer getMapContainer(String mapName)

getMapContainers

Map<String,MapContainer> getMapContainers()

getPartitionContainer

PartitionContainer getPartitionContainer(int partitionId)

initPartitionsContainers

void initPartitionsContainers()

clearPartitionData

void clearPartitionData(int partitionId)

serviceName

String serviceName()

getService

MapService getService()

clearPartitions

void clearPartitions()

destroyMapStores

void destroyMapStores()

flushMaps

void flushMaps()

destroyMap

void destroyMap(String mapName)

reset

void reset()

getNearCacheProvider

NearCacheProvider getNearCacheProvider()

getRecordStore

RecordStore getRecordStore(int partitionId,
                           String mapName)

getExistingRecordStore

RecordStore getExistingRecordStore(int partitionId,
                                   String mapName)

getOwnedPartitions

Collection<Integer> getOwnedPartitions()

reloadOwnedPartitions

void reloadOwnedPartitions()

isOwnedKey

boolean isOwnedKey(Data key)
Check if key belongs on partitions of the this node

Parameters:
key - key to be queried.
Returns:
true if this node owns the key

getWriteBehindQueueItemCounter

AtomicInteger getWriteBehindQueueItemCounter()

getExpirationManager

ExpirationManager getExpirationManager()

getEvictionOperator

EvictionOperator getEvictionOperator()

setService

void setService(MapService mapService)

getNodeEngine

NodeEngine getNodeEngine()

getMergePolicyProvider

MergePolicyProvider getMergePolicyProvider()

getMapEventPublisher

MapEventPublisher getMapEventPublisher()

getMapContextQuerySupport

MapContextQuerySupport getMapContextQuerySupport()

getLocalMapStatsProvider

LocalMapStatsProvider getLocalMapStatsProvider()

getNow

long getNow()

toObject

Object toObject(Object data)

toData

Data toData(Object object,
            PartitioningStrategy partitionStrategy)

toData

Data toData(Object object)

compare

boolean compare(String mapName,
                Object value1,
                Object value2)


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.