akka.cluster

Cluster

class Cluster extends Extension

This module is responsible for Gossiping cluster information. The abstraction maintains the list of live and dead members. Periodically i.e. every 1 second this module chooses a random member and initiates a round of Gossip with it.

During each round of gossip exchange it sends Gossip to random node with newer or older state information, if any, based on the current gossip overview, with some probability. Otherwise Gossip to any random live node.

Example:

if (Cluster(system).isLeader) { ... }
Linear Supertypes
Extension, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Cluster
  2. Extension
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Cluster(system: ExtendedActorSystem)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def down(address: Address): Unit

    Send command to DOWN the node specified by 'address'.

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. val failureDetector: FailureDetector

  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. def isTerminated: Boolean

    Returns true if this cluster instance has be shutdown.

  17. def join(address: Address): Unit

    Try to join this cluster node with the node specified by 'address'.

    Try to join this cluster node with the node specified by 'address'. A 'Join(thisNodeAddress)' command is sent to the node to join.

  18. def leave(address: Address): Unit

    Send command to issue state transition to LEAVING for the node specified by 'address'.

  19. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  22. def publishCurrentClusterState(): Unit

    Publish current (full) state of the cluster to subscribers, that are subscribing to akka.cluster.ClusterEvent.ClusterDomainEvent or akka.cluster.ClusterEvent.CurrentClusterState.

    Publish current (full) state of the cluster to subscribers, that are subscribing to akka.cluster.ClusterEvent.ClusterDomainEvent or akka.cluster.ClusterEvent.CurrentClusterState. If you want this to happen periodically you need to schedule a call to this method yourself.

  23. def registerOnMemberUp(callback: Runnable): Unit

    Java API: The supplied callback will be run, once, when current cluster member is Up.

    Java API: The supplied callback will be run, once, when current cluster member is Up. Typically used together with configuration option akka.cluster.min-nr-of-members' to defer some action, such as starting actors, until the cluster has reached a certain size.

  24. def registerOnMemberUp[T](code: ⇒ T): Unit

    The supplied thunk will be run, once, when current cluster member is Up.

    The supplied thunk will be run, once, when current cluster member is Up. Typically used together with configuration option akka.cluster.min-nr-of-members' to defer some action, such as starting actors, until the cluster has reached a certain size.

  25. val selfAddress: Address

  26. def sendCurrentClusterState(receiver: ActorRef): Unit

    Publish current (full) state of the cluster to the specified receiver.

    Publish current (full) state of the cluster to the specified receiver. If you want this to happen periodically you need to schedule a call to this method yourself.

  27. val settings: ClusterSettings

  28. def subscribe(subscriber: ActorRef, to: Class[_]): Unit

    Subscribe to cluster domain events.

    Subscribe to cluster domain events. The to Class can be akka.cluster.ClusterEvent.ClusterDomainEvent or subclass.

    A snapshot of akka.cluster.ClusterEvent.CurrentClusterState will be sent to the subscriber as the first event. When to Class is a akka.cluster.ClusterEvent.InstantMemberEvent (or subclass) the snapshot event will instead be a akka.cluster.ClusterEvent.InstantClusterState.

  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. val system: ExtendedActorSystem

  31. def toString(): String

    Definition Classes
    AnyRef → Any
  32. def unsubscribe(subscriber: ActorRef, to: Class[_]): Unit

    Unsubscribe to a specific type of cluster domain events, matching previous subscribe registration.

  33. def unsubscribe(subscriber: ActorRef): Unit

    Unsubscribe to all cluster domain events.

  34. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  35. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  36. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Extension

Inherited from AnyRef

Inherited from Any

Ungrouped