站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 cluster API Documentation 英文版文档

HATarget (JBoss Cluster API) - JBoss 4.0.1 sp1 cluster API Documentation 英文版文档


org.jboss.ha.framework.server
Class HATarget

java.lang.Object
  extended byorg.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 $

Revisions:

2002/01/13: Bill Burke

  1. Initial revision
Author:
bill@burkecentral.com

Field Summary
protected  int allowInvocationsStatus
           
protected  int clusterViewId
           
static int DISABLE_INVOCATIONS
           
static int ENABLE_INVOCATIONS
           
protected  EDU.oswego.cs.dl.util.concurrent.Latch latch
           
protected  org.jboss.logging.Logger log
           
static int MAKE_INVOCATIONS_WAIT
           
protected  HAPartition partition
           
protected  String replicantName
           
protected  ArrayList replicants
           
protected  Serializable target
           
 
Constructor Summary
HATarget(HAPartition partition, String replicantName, Serializable target, int allowInvocations)
           
 
Method Summary
protected  void cleanExistenceInCurrentHAPartition()
           
 void destroy()
           
 void disable()
           
 HAPartition getAssociatedPartition()
           
 long getCurrentViewId()
           
 ArrayList getReplicants()
           
 void init()
           
 boolean invocationsAllowed()
           
protected  void releaseCurrentLatch()
           
 void replicantsChanged(String key, List newReplicants, int newReplicantsViewId)
          Callback called when the content/list of replicant for a given replicant key has changed
 void setInvocationsAuthorization(int status)
           
 String toString()
           
 void updateHAPartition(HAPartition partition)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

HATarget

public HATarget(HAPartition partition,
                String replicantName,
                Serializable target,
                int allowInvocations)
         throws Exception
Method Detail

init

public void init()
          throws Exception
Throws:
Exception

toString

public String toString()

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 changed
newReplicants - The list of new replicants for the give replicant key
newReplicantsViewId - The new replicant view id corresponding to this change

cleanExistenceInCurrentHAPartition

protected void cleanExistenceInCurrentHAPartition()


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.