Shared data allows you to share data safely between different parts of your application in a safe way.
Shared data provides:
WARNING: In clustered mode, asynchronous maps/locks/counters rely on distributed data structures provided by the cluster manager. Beware that the latency relative to asynchronous maps/locks/counters operations can be much higher in clustered than in local mode.
Please see the documentation for more information.
AnythingObjectSharedDataBasicIdentifiableObjectAnythingno subtypes hierarchy
| Initializer |
SharedData(SharedData unknown) |
| Inherited Attributes |
Attributes inherited from: Objecthash, string |
| Methods | |
getAsyncMap | shared default void getAsyncMap<K, V>(String name, Anything(Throwable|AsyncMap<K?,V?>) resultHandler)Get the AsyncMap with the specified name. When clustered, the map is accessible to all nodes in the cluster and data put into the map from any node is visible to to any other node. WARNING: In clustered mode, asynchronous shared maps rely on distributed data structures provided by the cluster manager. Beware that the latency relative to asynchronous shared maps operations can be much higher in clustered than in local mode. Parameters:
|
getClusterWideMap | shared default void getClusterWideMap<K, V>(String name, Anything(Throwable|AsyncMap<K?,V?>) resultHandler)Get the cluster wide map with the specified name. The map is accessible to all nodes in the cluster and data put into the map from any node is visible to to any other node. Parameters:
|
getCounter | shared default void getCounter(String name, Anything(Throwable|Counter) resultHandler)Get an asynchronous counter. The counter will be passed to the handler. Parameters:
|
getLocalMap | shared default LocalMap<K?,V?> getLocalMap<K, V>(String name)Return a Parameters:
|
getLock | shared default void getLock(String name, Anything(Throwable|Lock) resultHandler)Get an asynchronous lock with the specified name. The lock will be passed to the handler when it is available. Parameters:
|
getLockWithTimeout | shared default void getLockWithTimeout(String name, Integer timeout, Anything(Throwable|Lock) resultHandler)Like getLock but specifying a timeout. If the lock is not obtained within the timeout a failure will be sent to the handler Parameters:
|
| Inherited Methods |
Methods inherited from: Objectequals |