Classes
AsyncMapshared AsyncMap<K,V>

An asynchronous map.

Countershared Counter

An asynchronous counter that can be used to across the cluster to maintain a consistent count.

LocalMapshared LocalMap<K,V>

Local maps can be used to share data safely in a single Vert.x instance.

The map only allows immutable keys and values in the map, OR certain mutable objects such as Buffer instances which will be copied when they are added to the map.

This ensures there is no shared access to mutable state from different threads (e.g. different event loops) in the Vert.x instance, and means you don't have to protect access to that state using synchronization or locks.

Your own objects can be marked as immutable by implementing the io.vertx.core.shareddata.Shareable interface.

Since the version 3.4, this class extends the interface. However some methods are only accessible in Java.

Lockshared Lock

An asynchronous exclusive lock which can be obtained from any node in the cluster.

When the lock is obtained, no-one else in the cluster can obtain the lock with the same name until the lock is released.

SharedDatashared SharedData

Shared data allows you to share data safely between different parts of your application in a safe way.

Shared data provides:

  • Cluster wide maps which can be accessed from any node of the cluster
  • Cluster wide locks which can be used to give exclusive access to resources across the cluster
  • Cluster wide counters used to maintain counts consistently across the cluster
  • Local maps for sharing data safely in the same Vert.x instance

Please see the documentation for more information.