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:
- 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.
- 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
- @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] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
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 a cluster wide counter.
Get a cluster wide 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 a cluster wide lock with the specified name.
Get a cluster wide 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
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
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
- @throws( ... )