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.
- Alphabetic
- By Inheritance
- SharedData
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new SharedData(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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.
- name
the name of the map
- resultHandler
the map will be returned asynchronously in this handler
-
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.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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.
- name
the name of the map
- resultHandler
the map will be returned asynchronously in this handler
-
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.
-
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.
- name
the name of the counter.
- resultHandler
the handler
-
def
getCounterFuture(name: String): scala.concurrent.Future[Counter]
Like getCounter but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
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 specificname
.Return a
LocalMap
with the specificname
.- name
the name of the map
- returns
the msp
-
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.
- name
the name of the lock
- resultHandler
the handler
-
def
getLockFuture(name: String): scala.concurrent.Future[Lock]
Like getLock but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
getLockWithTimeout(name: String, timeout: Long, resultHandler: Handler[AsyncResult[Lock]]): Unit
Like io.vertx.scala.core.shareddata.SharedData#getLockFuture but specifying a timeout.
Like io.vertx.scala.core.shareddata.SharedData#getLockFuture but specifying a timeout. If the lock is not obtained within the timeout a failure will be sent to the handler
- name
the name of the lock
- timeout
the timeout in ms
- resultHandler
the handler
-
def
getLockWithTimeoutFuture(name: String, timeout: Long): scala.concurrent.Future[Lock]
Like getLockWithTimeout but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )