io.vertx.rxjava.core.shareddata

## Class SharedData

- java.lang.Object
- - io.vertx.rxjava.core.shareddata.SharedData

-     public class SharedData
      extends Object

  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 `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static TypeArg<SharedData>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SharedData(SharedData delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `<K,V> void` | `getClusterWideMap(String name, Handler<AsyncResult<AsyncMap<K,V>>> resultHandler)` Get the cluster wide map with the specified name.
    `<K,V> rx.Observable<AsyncMap<K,V>>` | `getClusterWideMapObservable(String name)` Deprecated. use `rxGetClusterWideMap(java.lang.String)` instead
    `void` | `getCounter(String name, Handler<AsyncResult<Counter>> resultHandler)` Get a cluster wide counter.
    `rx.Observable<Counter>` | `getCounterObservable(String name)` Deprecated. use `rxGetCounter(java.lang.String)` instead
    `SharedData` | `getDelegate()`
    `<K,V> LocalMap<K,V>` | `getLocalMap(String name)` Return a `LocalMap` with the specific `name`.
    `void` | `getLock(String name, Handler<AsyncResult<Lock>> resultHandler)` Get a cluster wide lock with the specified name.
    `rx.Observable<Lock>` | `getLockObservable(String name)` Deprecated. use `rxGetLock(java.lang.String)` instead
    `void` | `getLockWithTimeout(String name, long timeout, Handler<AsyncResult<Lock>> resultHandler)` Like `getLock(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.rxjava.core.shareddata.Lock>>)` but specifying a timeout.
    `rx.Observable<Lock>` | `getLockWithTimeoutObservable(String name, long timeout)` Deprecated. use `rxGetLockWithTimeout(java.lang.String, long)` instead
    `static SharedData` | `newInstance(SharedData arg)`
    `<K,V> rx.Single<AsyncMap<K,V>>` | `rxGetClusterWideMap(String name)` Get the cluster wide map with the specified name.
    `rx.Single<Counter>` | `rxGetCounter(String name)` Get a cluster wide counter.
    `rx.Single<Lock>` | `rxGetLock(String name)` Get a cluster wide lock with the specified name.
    `rx.Single<Lock>` | `rxGetLockWithTimeout(String name, long timeout)` Like `getLock(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.rxjava.core.shareddata.Lock>>)` but specifying a timeout.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final TypeArg<SharedData> __TYPE_ARG

  - ### Constructor Detail

    - #### SharedData

          public SharedData(SharedData delegate)

  - ### Method Detail

    - #### getDelegate

          public SharedData getDelegate()

    - #### getClusterWideMap

          public <K,V> void getClusterWideMap(String name,
                                              Handler<AsyncResult<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:
        `name` - the name of the map
        `resultHandler` - the map will be returned asynchronously in this handler

    - #### getClusterWideMapObservable

          @Deprecated
          public <K,V> rx.Observable<AsyncMap<K,V>> getClusterWideMapObservable(String name)

      Deprecated. use `rxGetClusterWideMap(java.lang.String)` instead
      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:
        `name` - the name of the map
      Returns:

    - #### rxGetClusterWideMap

          public <K,V> rx.Single<AsyncMap<K,V>> rxGetClusterWideMap(String name)

      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:
        `name` - the name of the map
      Returns:

    - #### getLock

          public void getLock(String name,
                              Handler<AsyncResult<Lock>> resultHandler)

      Get a cluster wide lock with the specified name. The lock will be passed to the handler when it is available.
      Parameters:
        `name` - the name of the lock
        `resultHandler` - the handler

    - #### getLockObservable

          @Deprecated
          public rx.Observable<Lock> getLockObservable(String name)

      Deprecated. use `rxGetLock(java.lang.String)` instead
      Get a cluster wide lock with the specified name. The lock will be passed to the handler when it is available.
      Parameters:
        `name` - the name of the lock
      Returns:

    - #### rxGetLock

          public rx.Single<Lock> rxGetLock(String name)

      Get a cluster wide lock with the specified name. The lock will be passed to the handler when it is available.
      Parameters:
        `name` - the name of the lock
      Returns:

    - #### getLockWithTimeout

          public void getLockWithTimeout(String name,
                                         long timeout,
                                         Handler<AsyncResult<Lock>> resultHandler)

      Like `getLock(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.rxjava.core.shareddata.Lock>>)` but specifying a timeout. If the lock is not obtained within the timeout a failure will be sent to the handler
      Parameters:
        `name` - the name of the lock
        `timeout` - the timeout in ms
        `resultHandler` - the handler

    - #### getLockWithTimeoutObservable

          @Deprecated
          public rx.Observable<Lock> getLockWithTimeoutObservable(String name,
                                                                              long timeout)

      Deprecated. use `rxGetLockWithTimeout(java.lang.String, long)` instead
      Like `getLock(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.rxjava.core.shareddata.Lock>>)` but specifying a timeout. If the lock is not obtained within the timeout a failure will be sent to the handler
      Parameters:
        `name` - the name of the lock
        `timeout` - the timeout in ms
      Returns:

    - #### rxGetLockWithTimeout

          public rx.Single<Lock> rxGetLockWithTimeout(String name,
                                                      long timeout)

      Like `getLock(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.rxjava.core.shareddata.Lock>>)` but specifying a timeout. If the lock is not obtained within the timeout a failure will be sent to the handler
      Parameters:
        `name` - the name of the lock
        `timeout` - the timeout in ms
      Returns:

    - #### getCounter

          public void getCounter(String name,
                                 Handler<AsyncResult<Counter>> resultHandler)

      Get a cluster wide counter. The counter will be passed to the handler.
      Parameters:
        `name` - the name of the counter.
        `resultHandler` - the handler

    - #### getCounterObservable

          @Deprecated
          public rx.Observable<Counter> getCounterObservable(String name)

      Deprecated. use `rxGetCounter(java.lang.String)` instead
      Get a cluster wide counter. The counter will be passed to the handler.
      Parameters:
        `name` - the name of the counter.
      Returns:

    - #### rxGetCounter

          public rx.Single<Counter> rxGetCounter(String name)

      Get a cluster wide counter. The counter will be passed to the handler.
      Parameters:
        `name` - the name of the counter.
      Returns:

    - #### getLocalMap

          public <K,V> LocalMap<K,V> getLocalMap(String name)

      Return a `LocalMap` with the specific `name`.
      Parameters:
        `name` - the name of the map
      Returns:
        the msp

    - #### newInstance

          public static SharedData newInstance(SharedData arg)

Copyright © 2017. All rights reserved.