package org.example;

import com.hazelcast.client.HazelcastClient;
import com.hazelcast.client.config.ClientConfig;
import com.hazelcast.core.HazelcastInstance;

import java.util.Map;

public class ClientNode {
    public static void main(String[] args) throws InterruptedException {
        ClientConfig config = new ClientConfig();
        config.setClusterName("dev");
        HazelcastInstance hziClient = HazelcastClient.newHazelcastClient(config);

        Map<Long, String> map = hziClient.getMap("test");

        System.out.println(map.get(1234L));

        // default: blocking
        hziClient.shutdown(); // shutdown immediately
    }
}
