com.hazelcast.map.impl
Interface MapServiceContext

All Superinterfaces:
MapServiceContextEventListenerSupport, MapServiceContextInterceptorSupport

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()
           
 Collection<Integer> getOwnedPartitions()
           
 PartitionContainer getPartitionContainer(int partitionId)
           
 RecordStore getRecordStore(int partitionId, String mapName)
           
 MapService getService()
           
 AtomicInteger getWriteBehindQueueItemCounter()
           
 void initPartitionsContainers()
           
 void reloadOwnedPartitions()
           
 void reset()
           
 void setEvictionOperator(EvictionOperator evictionOperator)
          Sets an EvictionOperator to this MapServiceContext.
 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, generateInterceptorId, interceptAfterGet, interceptAfterPut, interceptAfterRemove, interceptGet, interceptPut, interceptRemove, removeInterceptor
 
Methods inherited from interface com.hazelcast.map.impl.MapServiceContextEventListenerSupport
addEventListener, addLocalEventListener, addLocalEventListener, addPartitionLostListener, removeEventListener, removePartitionLostListener
 

Method Detail

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)

getMapContainer

MapContainer getMapContainer(String mapName)

getMapContainers

Map<String,MapContainer> getMapContainers()

getPartitionContainer

PartitionContainer getPartitionContainer(int partitionId)

initPartitionsContainers

void initPartitionsContainers()

clearPartitionData

void clearPartitionData(int partitionId)

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()

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()

setEvictionOperator

void setEvictionOperator(EvictionOperator evictionOperator)
Sets an EvictionOperator to this MapServiceContext. Used for testing purposes.

Parameters:
evictionOperator - EvictionOperator to be set.


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