Şu satırı dahil ederiz
import com.hazelcast.core.DistributedObject;
getName metodu
Örnek
Şöyle yaparız
HazelcastInstance hazelcastInstance = HazelcastClient.newHazelcastClient();Collection<DistributedObject> distributedObjects = hazelcastInstance .getDistributedObjects();for (DistributedObject object : distributedObjects) {if (object instanceof IMap) {IMap map = hazelcastInstance.getMap(object.getName());System.out.println("Mapname=" + map.getName());map.entrySet().forEach(System.out::println);}}hazelcastInstance.shutdown();
Hiç yorum yok:
Yorum Gönder