참고url)

Getting Start : https://docs.hazelcast.com/imdg/latest/getting-started.html

Download : https://hazelcast.org/imdg/download/

https://stackoverflow.com/questions/62828652/how-to-install-hazelcast-imdg-in-ubuntu-server

 

 

설치)

wget -qO - https://repository.hazelcast.com/api/gpg/key/public | sudo apt-key add -
echo "deb https://repository.hazelcast.com/debian stable main" | sudo tee -a /etc/apt/sources.list
sudo apt update && sudo apt install hazelcast

 

터미널3개 창을 열고 hz start 실행하여 Creating a Cluster.

 

 

java client source : 

//Installation notes: You have to have Hazelcast Java Client on the classpath.
//The simplest way of doing it is to put `hazelcast-all` JAR
//on the classpath, e.g. via Maven. See "Installation" chapter for details.

import com.hazelcast.client.HazelcastClient;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.map.IMap;

public class TesterFile {
 public static void main(String[] args) {
     // Start the client and connect to the cluster
     HazelcastInstance hz = HazelcastClient.newHazelcastClient();
     // Create a Distributed Map in the cluster
     IMap map = hz.getMap("my-distributed-map");
     //Standard Put and Get
     map.put("1", "John");
     map.put("2", "Mary");
     map.put("3", "Jane");
     // Shutdown the client
//     hz.shutdown();
    
 }

> java application으로 2회실행.

 

Cluster 관리화면

 

 

 

+ Recent posts