FileDocCategorySizeDatePackage
HASingletonElectionPolicy.javaAPI DocJBoss 4.2.11746Fri Jul 13 20:52:36 BST 2007org.jboss.ha.singleton

HASingletonElectionPolicy

public interface HASingletonElectionPolicy

Fields Summary
Constructors Summary
Methods Summary
public org.jboss.ha.framework.interfaces.HAPartitiongetHAPartition()

public java.lang.ObjectgetManagedSingleton()

public booleanisElectedMaster()
Conducts an election and returns whether the managed service is the master, based on the current view of partition.

return
true only if the managed service is the master

public booleanisElectedMaster(org.jboss.ha.framework.interfaces.HAPartition partition)
Given the HAPartition, return whether the managed service is the master.

param
partition
return
true only if the managed service is the master

public org.jboss.ha.framework.interfaces.ClusterNodepickSingleton()
Return the elected master node.

return
the master node

public org.jboss.ha.framework.interfaces.ClusterNodepickSingleton(org.jboss.ha.framework.interfaces.HAPartition partition)
Given the HAPartition, return the elected master node.

param
partition
return
the master node

public voidsetHAPartition(org.jboss.ha.framework.interfaces.HAPartition partition)
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.

public voidsetManagedSingleton(java.lang.Object singleton)
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.