1

Is there anyway in Hazelcast client to get the list of AtomicLongs present in the cluster. I might need to know the counter names to clear it, since there is no TTL for AtomicCounter.

Thanks in advance.

1 Answers1

0

you can list all distributed objects and filter AtomicLongs

        Collection<DistributedObject> distributedObjects = instance.getDistributedObjects();
        List<DistributedObject> atomicLongList = distributedObjects
            .stream()
            .filter(o -> o.getServiceName().equals(AtomicLongService.SERVICE_NAME))
            .collect(Collectors.toList());
ali
  • 876
  • 4
  • 9