use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class AbstractMapAddEntryListenerMessageTask method call.
@Override
protected Object call() {
final ClientEndpoint endpoint = getEndpoint();
final MapService mapService = getService(MapService.SERVICE_NAME);
Object listener = newMapListener();
MapServiceContext mapServiceContext = mapService.getMapServiceContext();
String name = getDistributedObjectName();
EventFilter eventFilter = getEventFilter();
String registrationId;
if (isLocalOnly()) {
registrationId = mapServiceContext.addLocalEventListener(listener, eventFilter, name);
} else {
registrationId = mapServiceContext.addEventListener(listener, eventFilter, name);
}
endpoint.addListenerDestroyAction(MapService.SERVICE_NAME, name, registrationId);
return registrationId;
}
use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class MapFlushMessageTask method call.
@Override
protected Object call() throws Exception {
MapService mapService = getService(SERVICE_NAME);
MapServiceContext mapServiceContext = mapService.getMapServiceContext();
NodeEngine nodeEngine = mapServiceContext.getNodeEngine();
ProxyService proxyService = nodeEngine.getProxyService();
DistributedObject distributedObject = proxyService.getDistributedObject(SERVICE_NAME, parameters.name);
MapProxyImpl mapProxy = (MapProxyImpl) distributedObject;
mapProxy.flush();
return null;
}
use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class WriteBehindStore method getInMemoryFormat.
private static InMemoryFormat getInMemoryFormat(MapStoreContext mapStoreContext) {
MapServiceContext mapServiceContext = mapStoreContext.getMapServiceContext();
NodeEngine nodeEngine = mapServiceContext.getNodeEngine();
Config config = nodeEngine.getConfig();
String mapName = mapStoreContext.getMapName();
MapConfig mapConfig = config.findMapConfig(mapName);
return mapConfig.getInMemoryFormat();
}
use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class EntryOperation method getLocalMapStats.
private LocalMapStatsImpl getLocalMapStats() {
final MapServiceContext mapServiceContext = mapService.getMapServiceContext();
final LocalMapStatsProvider localMapStatsProvider = mapServiceContext.getLocalMapStatsProvider();
return localMapStatsProvider.getLocalMapStatsImpl(name);
}
use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class BasicMapStoreContext method callLifecycleSupportInit.
private static void callLifecycleSupportInit(MapStoreContext mapStoreContext) {
final MapStoreWrapper mapStoreWrapper = mapStoreContext.getMapStoreWrapper();
final MapServiceContext mapServiceContext = mapStoreContext.getMapServiceContext();
final NodeEngine nodeEngine = mapServiceContext.getNodeEngine();
final HazelcastInstance hazelcastInstance = nodeEngine.getHazelcastInstance();
final MapStoreConfig mapStoreConfig = mapStoreContext.getMapStoreConfig();
final Properties properties = mapStoreConfig.getProperties();
final String mapName = mapStoreContext.getMapName();
mapStoreWrapper.init(hazelcastInstance, properties, mapName);
}
Aggregations