Added methods for Cluster.remove and Cluster.release that accepts ActorRef
This commit is contained in:
parent
5d4f8b4bcb
commit
df8c4dac89
3 changed files with 27 additions and 114 deletions
|
|
@ -691,6 +691,13 @@ class DefaultClusterNode private[akka] (
|
|||
this
|
||||
} else throw new ClusterException("Not connected to cluster")
|
||||
|
||||
/**
|
||||
* Removes actor from the cluster.
|
||||
*/
|
||||
def remove(actorRef: ActorRef) {
|
||||
remove(actorRef.uuid)
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes actor with uuid from the cluster.
|
||||
*/
|
||||
|
|
@ -825,10 +832,20 @@ class DefaultClusterNode private[akka] (
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks in an actor after done using it on this node.
|
||||
*/
|
||||
def release(actorRef: ActorRef) {
|
||||
release(actorRef.address)
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks in an actor after done using it on this node.
|
||||
*/
|
||||
def release(actorAddress: String) {
|
||||
|
||||
// FIXME 'Cluster.release' needs to notify all existing ClusterActorRef's that are using the instance that it is no longer available. Then what to do? Should we even remove this method?
|
||||
|
||||
isConnected ifOn {
|
||||
actorUuidsForActorAddress(actorAddress) foreach { uuid ⇒
|
||||
EventHandler.debug(this,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue