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 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

  18. 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

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

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

  20. 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

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

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

  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  28. def toString(): String
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped