org.jboss.ha.framework.server
Class HATarget
java.lang.Object
org.jboss.ha.framework.server.HATarget
- All Implemented Interfaces:
- DistributedReplicantManager.ReplicantListener
- Direct Known Subclasses:
- HARMIServerImpl.RefreshProxiesHATarget
public class HATarget
- extends Object
- implements DistributedReplicantManager.ReplicantListener
This class is a holder and manager of replicants.
It manages lists of replicated objects and changes the list as the HAPartition
notifies it.
- Version:
- $Revision: 1.9.6.2 $
Revisions:
2002/01/13: Bill Burke
- Initial revision
- Author:
- bill@burkecentral.com
DISABLE_INVOCATIONS
public static final int DISABLE_INVOCATIONS
- See Also:
- Constant Field Values
MAKE_INVOCATIONS_WAIT
public static final int MAKE_INVOCATIONS_WAIT
- See Also:
- Constant Field Values
ENABLE_INVOCATIONS
public static final int ENABLE_INVOCATIONS
- See Also:
- Constant Field Values
replicantName
protected String replicantName
replicants
protected ArrayList replicants
partition
protected HAPartition partition
log
protected org.jboss.logging.Logger log
clusterViewId
protected int clusterViewId
target
protected Serializable target
allowInvocationsStatus
protected int allowInvocationsStatus
latch
protected EDU.oswego.cs.dl.util.concurrent.Latch latch
HATarget
public HATarget(HAPartition partition,
String replicantName,
Serializable target,
int allowInvocations)
throws Exception
- Throws:
Exception
init
public void init()
throws Exception
- Throws:
Exception
toString
public String toString()
- Overrides:
toString
in class Object
getCurrentViewId
public long getCurrentViewId()
destroy
public void destroy()
disable
public void disable()
getReplicants
public ArrayList getReplicants()
updateHAPartition
public void updateHAPartition(HAPartition partition)
throws Exception
- Throws:
Exception
setInvocationsAuthorization
public void setInvocationsAuthorization(int status)
invocationsAllowed
public boolean invocationsAllowed()
throws InterruptedException
- Throws:
InterruptedException
releaseCurrentLatch
protected void releaseCurrentLatch()
getAssociatedPartition
public HAPartition getAssociatedPartition()
replicantsChanged
public void replicantsChanged(String key,
List newReplicants,
int newReplicantsViewId)
- Description copied from interface:
DistributedReplicantManager.ReplicantListener
- Callback called when the content/list of replicant for a given replicant key has changed
- Specified by:
replicantsChanged
in interface DistributedReplicantManager.ReplicantListener
- Parameters:
key
- The name of the key of the replicant that has changednewReplicants
- The list of new replicants for the give replicant key.
This list will be in a consistent order on all
cluster nodes on which the current viewId is
in effectnewReplicantsViewId
- The new replicant view id corresponding to this change
cleanExistenceInCurrentHAPartition
protected void cleanExistenceInCurrentHAPartition()
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.