| org.jboss.ha.singleton.HASingletonElectionPolicy
HASingletonElectionPolicy | public interface HASingletonElectionPolicy (Code) | | |
isElectedMaster | boolean isElectedMaster()(Code) | | Conducts an election and returns whether the managed service
is the master, based on the current view of partition.
true only if the managed service is the master |
isElectedMaster | boolean isElectedMaster(HAPartition partition)(Code) | | Given the HAPartition, return whether the managed service is the master.
Parameters: partition - true only if the managed service is the master |
pickSingleton | ClusterNode pickSingleton()(Code) | | Return the elected master node.
the master node |
pickSingleton | ClusterNode pickSingleton(HAPartition partition)(Code) | | Given the HAPartition, return the elected master node.
Parameters: partition - the master node |
setHAPartition | void setHAPartition(HAPartition partition)(Code) | | Sets the HAPartition; from this the election policy can gain
access to the DistributedReplicantManager for tracking the
deployment topology for the singleton service and to the HAPartition
for making group RPC calls.
|
setManagedSingleton | void setManagedSingleton(Object singleton)(Code) | | Called by the HASingleton to provide the election policy a reference to
itself. A policy that was designed to elect a particular kind of singleton
could downcast this object to a particular type and then access the
singleton for state information needed for the election decision.
|
|
|