Hazelcast 简明教程

Hazelcast - Data Structures

java.util.concurrent 包提供了诸如 AtomicLong、CountDownLatch、ConcurrentHashMap 这样的数据结构,当有多个线程对数据结构读/写数据时,这些数据结构非常有用。但是为了提供线程安全性,所有这些线程都应在单个 JVM/机器上。

java.util.concurrent package provides data structures such as AtomicLong, CountDownLatch, ConcurrentHashMap, etc. which are useful when you have more than one thread reading/writing data to the data structure. But to provide thread safety, all of these threads are expected to be on a single JVM/machine.

分布式数据结构有两个主要好处:

There are two major benefits of distributing data structure −

  1. Better Performance − If more than one machine has access to the data, all of them can work in parallel and complete the work in a lesser timespan.

  2. Data Backup − If a JVM/machine goes down, we have another JVMs/machines holding the data

Hazelcast 提供了一种跨 JVM/机器分配数据结构的方法。

Hazelcast provides a way to distribute your data structure across JVMs/machines.