use of com.hazelcast.replicatedmap.impl.operation.ClearOperationFactory in project hazelcast by hazelcast.
the class ReplicatedMapProxy method clear.
@Override
public void clear() {
OperationService operationService = nodeEngine.getOperationService();
try {
Map<Integer, Object> results = operationService.invokeOnAllPartitions(SERVICE_NAME, new ClearOperationFactory(name));
int deletedEntrySize = 0;
for (Object deletedEntryPerPartition : results.values()) {
deletedEntrySize += (Integer) deletedEntryPerPartition;
}
ReplicatedMapEventPublishingService eventPublishingService = service.getEventPublishingService();
eventPublishingService.fireMapClearedEvent(deletedEntrySize, name);
} catch (Throwable t) {
throw rethrow(t);
}
}
Aggregations