org.jboss.ha.framework.server
Class HATarget
java.lang.Object
org.jboss.ha.framework.server.HATarget
- All Implemented Interfaces:
- DistributedReplicantManager.ReplicantListener (src)
- Direct Known Subclasses:
- HARMIServerImpl.RefreshProxiesHATarget (src)
- public class HATarget
- extends java.lang.Object
- implements DistributedReplicantManager.ReplicantListener (src)
This class is a holder and manager of replicants.
It manages lists of replicated objects and changes the list as the HAPartition
notifies it.
Constructor Summary |
HATarget(HAPartition (src) partition,
java.lang.String replicantName,
java.io.Serializable target,
int allowInvocations)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DISABLE_INVOCATIONS
public static final int DISABLE_INVOCATIONS
- See Also:
- Constant Field Values (src)
MAKE_INVOCATIONS_WAIT
public static final int MAKE_INVOCATIONS_WAIT
- See Also:
- Constant Field Values (src)
ENABLE_INVOCATIONS
public static final int ENABLE_INVOCATIONS
- See Also:
- Constant Field Values (src)
replicantName
protected java.lang.String replicantName
replicants
protected java.util.ArrayList replicants
partition
protected HAPartition (src) partition
log
protected Logger (src) log
clusterViewId
protected int clusterViewId
target
protected java.io.Serializable target
allowInvocationsStatus
protected int allowInvocationsStatus
latch
protected Latch latch
HATarget
public HATarget(HAPartition (src) partition,
java.lang.String replicantName,
java.io.Serializable target,
int allowInvocations)
throws java.lang.Exception
init
public void init()
throws java.lang.Exception
- Throws:
java.lang.Exception
toString
public java.lang.String toString()
getCurrentViewId
public long getCurrentViewId()
destroy
public void destroy()
disable
public void disable()
getReplicants
public java.util.ArrayList getReplicants()
updateHAPartition
public void updateHAPartition(HAPartition (src) partition)
throws java.lang.Exception
- Throws:
java.lang.Exception
setInvocationsAuthorization
public void setInvocationsAuthorization(int status)
invocationsAllowed
public boolean invocationsAllowed()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
releaseCurrentLatch
protected void releaseCurrentLatch()
getAssociatedPartition
public HAPartition (src) getAssociatedPartition()
replicantsChanged
public void replicantsChanged(java.lang.String key,
java.util.List newReplicants,
int newReplicantsViewId)
- Description copied from interface:
DistributedReplicantManager.ReplicantListener (src)
- Callback called when the content/list of replicant for a given replicant key has changed
- Specified by:
replicantsChanged
in interface DistributedReplicantManager.ReplicantListener (src)
- Parameters:
key
- The name of the key of the replicant that has changednewReplicants
- The list of new replicants for the give replicant keynewReplicantsViewId
- The new replicant view id corresponding to this change
cleanExistenceInCurrentHAPartition
protected void cleanExistenceInCurrentHAPartition()