final
class
ClusterSingletonProxy extends Actor with ActorLogging
Type Members
-
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
def
+(other: String): String
-
-
final
def
==(arg0: Any): Boolean
-
def
add(m: Member): Unit
-
val
ageOrdering: Ordering[Member]
-
def
aroundPostRestart(reason: Throwable): Unit
-
def
aroundPostStop(): Unit
-
def
aroundPreRestart(reason: Throwable, message: Option[Any]): Unit
-
def
aroundPreStart(): Unit
-
def
aroundReceive(receive: actor.Actor.Receive, msg: Any): Unit
-
final
def
asInstanceOf[T0]: T0
-
def
buffer(msg: Any): Unit
-
var
buffer: MessageBuffer
-
def
cancelTimer(): Unit
-
def
clone(): AnyRef
-
val
cluster: Cluster
-
-
def
createIdentifyId(i: Int): String
-
-
-
-
-
-
-
def
finalize(): Unit
-
def
formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
-
def
handleInitial(state: CurrentClusterState): Unit
-
def
hashCode(): Int
-
var
identifyCounter: Int
-
var
identifyId: String
-
def
identifySingleton(): Unit
-
-
final
def
isInstanceOf[T0]: Boolean
-
-
def
matchingRole(member: Member): Boolean
-
var
membersByAge: SortedSet[Member]
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
postRestart(reason: Throwable): Unit
-
def
postStop(): Unit
-
def
preRestart(reason: Throwable, message: Option[Any]): Unit
-
def
preStart(): Unit
-
-
def
remove(m: Member): Unit
-
implicit final
val
self: ActorRef
-
def
sendBuffered(): Unit
-
final
def
sender(): ActorRef
-
-
val
singletonPath: Array[String]
-
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
def
trackChange(block: () ⇒ Unit): Unit
-
def
unhandled(message: Any): Unit
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
The
ClusterSingletonProxy
works together with the akka.cluster.singleton.ClusterSingletonManager to provide a distributed proxy to the singleton actor.The proxy can be started on every node where the singleton needs to be reached and used as if it were the singleton itself. It will then act as a router to the currently running singleton instance. If the singleton is not currently available, e.g., during hand off or startup, the proxy will buffer the messages sent to the singleton and then deliver them when the singleton is finally available. The size of the buffer is configurable and it can be disabled by using a buffer size of 0. When the buffer is full old messages will be dropped when new messages are sent via the proxy.
The proxy works by keeping track of the oldest cluster member. When a new oldest member is identified, e.g. because the older one left the cluster, or at startup, the proxy will try to identify the singleton on the oldest member by periodically sending an akka.actor.Identify message until the singleton responds with its akka.actor.ActorIdentity.
Note that this is a best effort implementation: messages can always be lost due to the distributed nature of the actors involved.