vertx / io.vertx.reactivex.core.shareddata / SharedData

# SharedData

`open class 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.

NOTE: This class has been automatically generated from the io.vertx.core.shareddata.SharedData non RX-ified interface using Vert.x codegen.

### Constructors

<init> | `SharedData(delegate: SharedData)`

### Properties

__TYPE_ARG | `static val __TYPE_ARG: TypeArg<SharedData>`

### Functions

equals | `open fun equals(other: Any?): Boolean`
getClusterWideMap | `open fun <K : Any, V : Any> getClusterWideMap(name: String, resultHandler: Handler<AsyncResult<AsyncMap<K, V>>>): Unit` 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.
getCounter | `open fun getCounter(name: String, resultHandler: Handler<AsyncResult<Counter>>): Unit` Get a cluster wide counter. The counter will be passed to the handler.
getDelegate | `open fun getDelegate(): SharedData`
getLocalMap | `open fun <K : Any, V : Any> getLocalMap(name: String): LocalMap<K, V>` Return a `LocalMap` with the specific `name`.
getLock | `open fun getLock(name: String, resultHandler: Handler<AsyncResult<Lock>>): Unit` Get a cluster wide lock with the specified name. The lock will be passed to the handler when it is available.
getLockWithTimeout | `open fun getLockWithTimeout(name: String, timeout: Long, resultHandler: Handler<AsyncResult<Lock>>): Unit` Like `io.vertx.reactivex.core.shareddata.SharedData#getLock` but specifying a timeout. If the lock is not obtained within the timeout a failure will be sent to the handler
hashCode | `open fun hashCode(): Int`
newInstance | `open static fun newInstance(arg: SharedData): SharedData`
rxGetClusterWideMap | `open fun <K : Any, V : Any> rxGetClusterWideMap(name: String): Single<AsyncMap<K, V>>` 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.
rxGetCounter | `open fun rxGetCounter(name: String): Single<Counter>` Get a cluster wide counter. The counter will be passed to the handler.
rxGetLock | `open fun rxGetLock(name: String): Single<Lock>` Get a cluster wide lock with the specified name. The lock will be passed to the handler when it is available.
rxGetLockWithTimeout | `open fun rxGetLockWithTimeout(name: String, timeout: Long): Single<Lock>` Like `io.vertx.reactivex.core.shareddata.SharedData#getLock` but specifying a timeout. If the lock is not obtained within the timeout a failure will be sent to the handler
toString | `open fun toString(): String`