Packages

class SharedData extends AnyRef

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

Shared data provides:

  • synchronous shared maps (local)
  • asynchronous maps (local or cluster-wide)
  • asynchronous locks (local or cluster-wide)
  • asynchronous counters (local or cluster-wide)

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.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SharedData
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SharedData(_asJava: AnyRef)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def asJava: AnyRef
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def getAsyncMap[K, V](name: String, resultHandler: Handler[AsyncResult[AsyncMap[K, V]]])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[K], arg1: scala.reflect.api.JavaUniverse.TypeTag[V]): Unit

    Get the io.vertx.scala.core.shareddata.AsyncMap with the specified name.

    Get the io.vertx.scala.core.shareddata.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. * @param name the name of the map

    resultHandler

    the map will be returned asynchronously in this handler

  11. def getAsyncMapFuture[K, V](name: String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[K], arg1: scala.reflect.api.JavaUniverse.TypeTag[V]): scala.concurrent.Future[AsyncMap[K, V]]

    Like getAsyncMap but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def getClusterWideMap[K, V](name: String, resultHandler: Handler[AsyncResult[AsyncMap[K, V]]])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[K], arg1: scala.reflect.api.JavaUniverse.TypeTag[V]): Unit

    Get the cluster wide map with the specified 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. * @param name the name of the map

    resultHandler

    the map will be returned asynchronously in this handler

  14. def getClusterWideMapFuture[K, V](name: String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[K], arg1: scala.reflect.api.JavaUniverse.TypeTag[V]): scala.concurrent.Future[AsyncMap[K, V]]

    Like getClusterWideMap but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  15. def getCounter(name: String, resultHandler: Handler[AsyncResult[Counter]]): Unit

    Get an asynchronous counter.

    Get an asynchronous counter. The counter will be passed to the handler. * @param name the name of the counter.

    resultHandler

    the handler

  16. def getCounterFuture(name: String): scala.concurrent.Future[Counter]

    Like getCounter but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  17. def getLocalAsyncMap[K, V](name: String, resultHandler: Handler[AsyncResult[AsyncMap[K, V]]])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[K], arg1: scala.reflect.api.JavaUniverse.TypeTag[V]): Unit

    Get the io.vertx.scala.core.shareddata.AsyncMap with the specified name.

    Get the io.vertx.scala.core.shareddata.AsyncMap with the specified name.

    When clustered, the map is NOT accessible to all nodes in the cluster. Only the instance which created the map can put and retrieve data from this map. * @param name the name of the map

    resultHandler

    the map will be returned asynchronously in this handler

  18. def getLocalAsyncMapFuture[K, V](name: String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[K], arg1: scala.reflect.api.JavaUniverse.TypeTag[V]): scala.concurrent.Future[AsyncMap[K, V]]

    Like getLocalAsyncMap but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  19. def getLocalCounter(name: String, resultHandler: Handler[AsyncResult[Counter]]): Unit

    Get an asynchronous local counter.

    Get an asynchronous local counter. The counter will be passed to the handler. * @param name the name of the counter.

    resultHandler

    the handler

  20. def getLocalCounterFuture(name: String): scala.concurrent.Future[Counter]

    Like getLocalCounter but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  21. def getLocalLock(name: String, resultHandler: Handler[AsyncResult[Lock]]): Unit

    Get an asynchronous local lock with the specified name.

    Get an asynchronous local lock with the specified name. The lock will be passed to the handler when it is available.

    In general lock acquision is unordered, so that sequential attempts to acquire a lock, even from a single thread, can happen in non-sequential order. * @param name the name of the lock

    resultHandler

    the handler

  22. def getLocalLockFuture(name: String): scala.concurrent.Future[Lock]

    Like getLocalLock but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  23. def getLocalLockWithTimeout(name: String, timeout: Long, resultHandler: Handler[AsyncResult[Lock]]): Unit

    Like io.vertx.scala.core.shareddata.SharedData#getLocalLock but specifying a timeout.

    Like io.vertx.scala.core.shareddata.SharedData#getLocalLock but specifying a timeout. If the lock is not obtained within the timeout a failure will be sent to the handler.

    In general lock acquision is unordered, so that sequential attempts to acquire a lock, even from a single thread, can happen in non-sequential order. * @param name the name of the lock

    timeout

    the timeout in ms

    resultHandler

    the handler

  24. def getLocalLockWithTimeoutFuture(name: String, timeout: Long): scala.concurrent.Future[Lock]

    Like getLocalLockWithTimeout but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  25. def getLocalMap[K, V](name: String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[K], arg1: scala.reflect.api.JavaUniverse.TypeTag[V]): LocalMap[K, V]

    Return a LocalMap with the specific name.

    Return a LocalMap with the specific name. * @param name the name of the map

    returns

    the msp

  26. def getLock(name: String, resultHandler: Handler[AsyncResult[Lock]]): Unit

    Get an asynchronous lock with the specified name.

    Get an asynchronous lock with the specified name. The lock will be passed to the handler when it is available.

    In general lock acquision is unordered, so that sequential attempts to acquire a lock, even from a single thread, can happen in non-sequential order. * @param name the name of the lock

    resultHandler

    the handler

  27. def getLockFuture(name: String): scala.concurrent.Future[Lock]

    Like getLock but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  28. def getLockWithTimeout(name: String, timeout: Long, resultHandler: Handler[AsyncResult[Lock]]): Unit

    Like io.vertx.scala.core.shareddata.SharedData#getLock but specifying a timeout.

    Like io.vertx.scala.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.

    In general lock acquision is unordered, so that sequential attempts to acquire a lock, even from a single thread, can happen in non-sequential order. * @param name the name of the lock

    timeout

    the timeout in ms

    resultHandler

    the handler

  29. def getLockWithTimeoutFuture(name: String, timeout: Long): scala.concurrent.Future[Lock]

    Like getLockWithTimeout but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  30. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  31. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  32. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  35. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  36. def toString(): String
    Definition Classes
    AnyRef → Any
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped