public void onPartitionLost(IPartitionLostEvent event) { final PartitionLostEvent partitionLostEvent = new PartitionLostEvent(event.getPartitionId(), event.getLostReplicaIndex(), event.getEventSource()); final EventService eventService = nodeEngine.getEventService(); final Collection<EventRegistration> registrations = eventService .getRegistrations(SERVICE_NAME, PARTITION_LOST_EVENT_TOPIC); eventService.publishEvent(SERVICE_NAME, registrations, partitionLostEvent, event.getPartitionId()); }
public void onPartitionLost(IPartitionLostEvent event) { final PartitionLostEvent partitionLostEvent = new PartitionLostEvent(event.getPartitionId(), event.getLostReplicaIndex(), event.getEventSource()); final EventService eventService = nodeEngine.getEventService(); final Collection<EventRegistration> registrations = eventService .getRegistrations(SERVICE_NAME, PARTITION_LOST_EVENT_TOPIC); eventService.publishEvent(SERVICE_NAME, registrations, partitionLostEvent, event.getPartitionId()); }
@Override public void onPartitionLost(IPartitionLostEvent partitionLostEvent) { int partitionId = partitionLostEvent.getPartitionId(); for (CacheConfig config : getCacheConfigs()) { final String cacheName = config.getName(); if (config.getTotalBackupCount() <= partitionLostEvent.getLostReplicaIndex()) { publishCachePartitionLostEvent(cacheName, partitionId); } } }
@Override public void onPartitionLost(IPartitionLostEvent partitionLostEvent) { int partitionId = partitionLostEvent.getPartitionId(); for (CacheConfig config : getCacheConfigs()) { final String cacheName = config.getName(); if (config.getTotalBackupCount() <= partitionLostEvent.getLostReplicaIndex()) { publishCachePartitionLostEvent(cacheName, partitionId); } } }
@Override public void onPartitionLost(IPartitionLostEvent partitionLostEvent) { final Address thisAddress = nodeEngine.getThisAddress(); final int partitionId = partitionLostEvent.getPartitionId(); Collection<DistributedObject> result = proxyService.getDistributedObjects(MapService.SERVICE_NAME); for (DistributedObject object : result) { final MapProxyImpl mapProxy = (MapProxyImpl) object; final String mapName = mapProxy.getName(); if (mapProxy.getTotalBackupCount() <= partitionLostEvent.getLostReplicaIndex()) { mapServiceContext.getMapEventPublisher().publishMapPartitionLostEvent(thisAddress, mapName, partitionId); } } }
@Override public void onPartitionLost(IPartitionLostEvent partitionLostEvent) { final Address thisAddress = nodeEngine.getThisAddress(); final int partitionId = partitionLostEvent.getPartitionId(); Collection<DistributedObject> result = proxyService.getDistributedObjects(MapService.SERVICE_NAME); for (DistributedObject object : result) { final MapProxyImpl mapProxy = (MapProxyImpl) object; final String mapName = mapProxy.getName(); if (mapProxy.getTotalBackupCount() <= partitionLostEvent.getLostReplicaIndex()) { mapServiceContext.getMapEventPublisher().publishMapPartitionLostEvent(thisAddress, mapName, partitionId); } } }