com.hazelcast.map.impl
Class DefaultMapServiceContext
java.lang.Object
com.hazelcast.map.impl.DefaultMapServiceContext
- All Implemented Interfaces:
- MapServiceContext, MapServiceContextEventListenerSupport, MapServiceContextInterceptorSupport
public class DefaultMapServiceContext
- extends Object
- implements MapServiceContext
Default implementation of map service context.
|
Method Summary |
String |
addEventListener(EntryListener entryListener,
EventFilter eventFilter,
String mapName)
|
String |
addInterceptor(String mapName,
MapInterceptor interceptor)
|
String |
addLocalEventListener(EntryListener entryListener,
EventFilter eventFilter,
String mapName)
|
String |
addLocalEventListener(EntryListener entryListener,
String mapName)
|
void |
clearPartitionData(int partitionId)
|
void |
clearPartitions()
|
boolean |
compare(String mapName,
Object value1,
Object value2)
|
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()
|
long |
getNow()
|
Collection<Integer> |
getOwnedPartitions()
|
PartitionContainer |
getPartitionContainer(int partitionId)
|
RecordStore |
getRecordStore(int partitionId,
String mapName)
|
MapService |
getService()
|
AtomicInteger |
getWriteBehindQueueItemCounter()
|
boolean |
hasRegisteredListener(String name)
|
void |
initPartitionsContainers()
|
void |
interceptAfterGet(String mapName,
Object value)
|
void |
interceptAfterPut(String mapName,
Object newValue)
|
void |
interceptAfterRemove(String mapName,
Object value)
|
Object |
interceptGet(String mapName,
Object value)
|
Object |
interceptPut(String mapName,
Object oldValue,
Object newValue)
|
Object |
interceptRemove(String mapName,
Object value)
|
boolean |
isOwnedKey(Data key)
Check if key belongs on partitions of the this node |
void |
reloadOwnedPartitions()
|
boolean |
removeEventListener(String mapName,
String registrationId)
|
void |
removeInterceptor(String mapName,
String id)
|
void |
reset()
|
String |
serviceName()
|
void |
setEvictionOperator(EvictionOperator evictionOperator)
Used for testing purposes. |
void |
setMapServiceContext(MapServiceContext mapServiceContext)
|
void |
setService(MapService mapService)
|
Data |
toData(Object object)
|
Data |
toData(Object object)
|
Data |
toData(Object object,
PartitioningStrategy partitionStrategy)
|
Data |
toData(Object object,
PartitioningStrategy partitionStrategy)
|
Object |
toObject(Object data)
|
Object |
toObject(Object data)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nodeEngine
protected NodeEngine nodeEngine
DefaultMapServiceContext
public DefaultMapServiceContext(NodeEngine nodeEngine)
getMapContainer
public MapContainer getMapContainer(String mapName)
- Specified by:
getMapContainer in interface MapServiceContext
getMapContainers
public Map<String,MapContainer> getMapContainers()
- Specified by:
getMapContainers in interface MapServiceContext
getPartitionContainer
public PartitionContainer getPartitionContainer(int partitionId)
- Specified by:
getPartitionContainer in interface MapServiceContext
initPartitionsContainers
public void initPartitionsContainers()
- Specified by:
initPartitionsContainers in interface MapServiceContext
clearPartitionData
public void clearPartitionData(int partitionId)
- Specified by:
clearPartitionData in interface MapServiceContext
serviceName
public String serviceName()
- Specified by:
serviceName in interface MapServiceContext
getService
public MapService getService()
- Specified by:
getService in interface MapServiceContext
clearPartitions
public void clearPartitions()
- Specified by:
clearPartitions in interface MapServiceContext
destroyMapStores
public void destroyMapStores()
- Specified by:
destroyMapStores in interface MapServiceContext
flushMaps
public void flushMaps()
- Specified by:
flushMaps in interface MapServiceContext
destroyMap
public void destroyMap(String mapName)
- Specified by:
destroyMap in interface MapServiceContext
reset
public void reset()
- Specified by:
reset in interface MapServiceContext
getNearCacheProvider
public NearCacheProvider getNearCacheProvider()
- Specified by:
getNearCacheProvider in interface MapServiceContext
getRecordStore
public RecordStore getRecordStore(int partitionId,
String mapName)
- Specified by:
getRecordStore in interface MapServiceContext
getExistingRecordStore
public RecordStore getExistingRecordStore(int partitionId,
String mapName)
- Specified by:
getExistingRecordStore in interface MapServiceContext
getOwnedPartitions
public Collection<Integer> getOwnedPartitions()
- Specified by:
getOwnedPartitions in interface MapServiceContext
reloadOwnedPartitions
public void reloadOwnedPartitions()
- Specified by:
reloadOwnedPartitions in interface MapServiceContext
isOwnedKey
public boolean isOwnedKey(Data key)
- Description copied from interface:
MapServiceContext
- Check if key belongs on partitions of the this node
- Specified by:
isOwnedKey in interface MapServiceContext
- Parameters:
key - key to be queried.
- Returns:
- true if this node owns the key
getWriteBehindQueueItemCounter
public AtomicInteger getWriteBehindQueueItemCounter()
- Specified by:
getWriteBehindQueueItemCounter in interface MapServiceContext
getExpirationManager
public ExpirationManager getExpirationManager()
- Specified by:
getExpirationManager in interface MapServiceContext
getEvictionOperator
public EvictionOperator getEvictionOperator()
- Specified by:
getEvictionOperator in interface MapServiceContext
setService
public void setService(MapService mapService)
- Specified by:
setService in interface MapServiceContext
getNodeEngine
public NodeEngine getNodeEngine()
- Specified by:
getNodeEngine in interface MapServiceContext
getMergePolicyProvider
public MergePolicyProvider getMergePolicyProvider()
- Specified by:
getMergePolicyProvider in interface MapServiceContext
getMapEventPublisher
public MapEventPublisher getMapEventPublisher()
- Specified by:
getMapEventPublisher in interface MapServiceContext
getMapContextQuerySupport
public MapContextQuerySupport getMapContextQuerySupport()
- Specified by:
getMapContextQuerySupport in interface MapServiceContext
getLocalMapStatsProvider
public LocalMapStatsProvider getLocalMapStatsProvider()
- Specified by:
getLocalMapStatsProvider in interface MapServiceContext
setEvictionOperator
public void setEvictionOperator(EvictionOperator evictionOperator)
- Used for testing purposes.
getNow
public long getNow()
toObject
public Object toObject(Object data)
toData
public Data toData(Object object,
PartitioningStrategy partitionStrategy)
toData
public Data toData(Object object)
compare
public boolean compare(String mapName,
Object value1,
Object value2)
setMapServiceContext
public void setMapServiceContext(MapServiceContext mapServiceContext)
getNow
public long getNow()
toObject
public Object toObject(Object data)
toData
public Data toData(Object object,
PartitioningStrategy partitionStrategy)
toData
public Data toData(Object object)
compare
public boolean compare(String mapName,
Object value1,
Object value2)
interceptAfterGet
public void interceptAfterGet(String mapName,
Object value)
- Specified by:
interceptAfterGet in interface MapServiceContextInterceptorSupport
interceptPut
public Object interceptPut(String mapName,
Object oldValue,
Object newValue)
- Specified by:
interceptPut in interface MapServiceContextInterceptorSupport
interceptAfterPut
public void interceptAfterPut(String mapName,
Object newValue)
- Specified by:
interceptAfterPut in interface MapServiceContextInterceptorSupport
interceptRemove
public Object interceptRemove(String mapName,
Object value)
- Specified by:
interceptRemove in interface MapServiceContextInterceptorSupport
interceptAfterRemove
public void interceptAfterRemove(String mapName,
Object value)
- Specified by:
interceptAfterRemove in interface MapServiceContextInterceptorSupport
addInterceptor
public String addInterceptor(String mapName,
MapInterceptor interceptor)
- Specified by:
addInterceptor in interface MapServiceContextInterceptorSupport
removeInterceptor
public void removeInterceptor(String mapName,
String id)
- Specified by:
removeInterceptor in interface MapServiceContextInterceptorSupport
interceptGet
public Object interceptGet(String mapName,
Object value)
- Specified by:
interceptGet in interface MapServiceContextInterceptorSupport
addLocalEventListener
public String addLocalEventListener(EntryListener entryListener,
String mapName)
- Specified by:
addLocalEventListener in interface MapServiceContextEventListenerSupport
addLocalEventListener
public String addLocalEventListener(EntryListener entryListener,
EventFilter eventFilter,
String mapName)
- Specified by:
addLocalEventListener in interface MapServiceContextEventListenerSupport
addEventListener
public String addEventListener(EntryListener entryListener,
EventFilter eventFilter,
String mapName)
- Specified by:
addEventListener in interface MapServiceContextEventListenerSupport
removeEventListener
public boolean removeEventListener(String mapName,
String registrationId)
- Specified by:
removeEventListener in interface MapServiceContextEventListenerSupport
hasRegisteredListener
public boolean hasRegisteredListener(String name)
- Specified by:
hasRegisteredListener in interface MapServiceContextEventListenerSupport
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.