use of com.hazelcast.replicatedmap.impl.ReplicatedMapEventPublishingService in project hazelcast by hazelcast.
the class AbstractReplicatedMapAddEntryListenerMessageTask method processInternal.
@Override
protected CompletableFuture<UUID> processInternal() {
ReplicatedMapService service = getService(ReplicatedMapService.SERVICE_NAME);
ReplicatedMapEventPublishingService eventPublishingService = service.getEventPublishingService();
Predicate predicate = getPredicate();
ReplicatedEntryEventFilter filter;
if (predicate == null) {
filter = new ReplicatedEntryEventFilter(getKey());
} else {
filter = new ReplicatedQueryEventFilter(getKey(), predicate);
}
return newCompletedFuture(eventPublishingService.addLocalEventListener(this, filter, getDistributedObjectName()));
}
use of com.hazelcast.replicatedmap.impl.ReplicatedMapEventPublishingService in project hazelcast by hazelcast.
the class ReplicatedMapRemoveEntryListenerMessageTask method deRegisterListener.
@Override
protected Future<Boolean> deRegisterListener() {
ReplicatedMapService service = getService(ReplicatedMapService.SERVICE_NAME);
ReplicatedMapEventPublishingService eventPublishingService = service.getEventPublishingService();
return eventPublishingService.removeEventListenerAsync(parameters.name, parameters.registrationId);
}
use of com.hazelcast.replicatedmap.impl.ReplicatedMapEventPublishingService in project hazelcast by hazelcast.
the class ReplicatedMapClearMessageTask method reduce.
@Override
protected Object reduce(Map<Integer, Object> map) {
int deletedEntrySize = 0;
for (Object deletedEntryPerPartition : map.values()) {
deletedEntrySize += (Integer) deletedEntryPerPartition;
}
ReplicatedMapService service = getService(getServiceName());
ReplicatedMapEventPublishingService eventPublishingService = service.getEventPublishingService();
eventPublishingService.fireMapClearedEvent(deletedEntrySize, getDistributedObjectName());
return null;
}
use of com.hazelcast.replicatedmap.impl.ReplicatedMapEventPublishingService in project hazelcast by hazelcast.
the class ReplicateUpdateOperation method publishEvent.
private void publishEvent() {
ReplicatedMapService service = getService();
ReplicatedMapEventPublishingService eventPublishingService = service.getEventPublishingService();
Data dataOldValue = getNodeEngine().toData(response.getResponse());
if (isRemove) {
eventPublishingService.fireEntryListenerEvent(dataKey, dataOldValue, null, name, origin);
} else {
eventPublishingService.fireEntryListenerEvent(dataKey, dataOldValue, dataValue, name, origin);
}
}
use of com.hazelcast.replicatedmap.impl.ReplicatedMapEventPublishingService in project hazelcast by hazelcast.
the class RemoveOperation method afterRun.
@Override
public void afterRun() throws Exception {
sendReplicationOperation(true);
ReplicatedMapEventPublishingService eventPublishingService = service.getEventPublishingService();
eventPublishingService.fireEntryListenerEvent(key, oldValue, null, name, getCallerAddress());
}
Aggregations