org.jboss.ha.framework.interfaces
Class ClusteringTargetsRepository

java.lang.Object
  extended by org.jboss.ha.framework.interfaces.ClusteringTargetsRepository

public class ClusteringTargetsRepository
extends Object

JVM singleton that associates a list of targets (+ other info) contained in a FamilyClusterInfo to a proxy family. For example, all remote proxies for a given EJB in a given cluster are part of the same proxy family. Note that home and remote for a same EJB form *2* proxy families.

Version:
$Revision: 74878 $

Revisions:

2002/08/23, Sacha Labourey:

Author:
Sacha Labourey.
See Also:
FamilyClusterInfo, FamilyClusterInfoImpl

Field Summary
protected static Hashtable families
           
 
Method Summary
static FamilyClusterInfo getFamilyClusterInfo(String familyName)
          Gets the FamilyClusterInfo registered under familyName.
static FamilyClusterInfo initTarget(String familyName, List targets)
          Same as initTarget(familyName, targets, 0L)
static FamilyClusterInfo initTarget(String familyName, List targets, long viewId)
          Checks for the existence of a FamilyClusterInfo with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

families

protected static Hashtable families
Method Detail

initTarget

public static FamilyClusterInfo initTarget(String familyName,
                                           List targets)
Same as initTarget(familyName, targets, 0L)


initTarget

public static FamilyClusterInfo initTarget(String familyName,
                                           List targets,
                                           long viewId)
Checks for the existence of a FamilyClusterInfo with the given name. If found, updates it; otherwise creates and caches a new FamilyClusterInfo.

This method must be synchronized to avoid race conditions leading to multiple FamilyClusterInfo instances for the same familyName.

Parameters:
familyName - the name of the proxy family
targets - the current list of targets for the proxy family
viewId - long that can be used as a shorthand identifier for the list of targets
Returns:
a FamilyClusterInfo encapsulating the current state of the familyName.

getFamilyClusterInfo

public static FamilyClusterInfo getFamilyClusterInfo(String familyName)
Gets the FamilyClusterInfo registered under familyName.

Parameters:
familyName - the identifier of the FamilyClusterInfo
Returns:
the FamilyClusterInfo, or null if none is registered


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.