ClusteringTargetsRepositorypublic 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. |
Fields Summary |
---|
protected static Hashtable | families |
Constructors Summary |
---|
private ClusteringTargetsRepository()
|
Methods Summary |
---|
public static FamilyClusterInfo | getFamilyClusterInfo(java.lang.String familyName)
return (FamilyClusterInfo)families.get (familyName);
| public static synchronized FamilyClusterInfo | initTarget(java.lang.String familyName, java.util.ArrayList targets)
// Static --------------------------------------------------------
return initTarget (familyName, targets, 0L);
| public static synchronized FamilyClusterInfo | initTarget(java.lang.String familyName, java.util.ArrayList targets, long viewId)
// this method must be somehow synchronized to avoid multiple FamilyClusterInfoImpl
// for the same familyName in multi-threaded app accessing the same bean
//
FamilyClusterInfoImpl family = (FamilyClusterInfoImpl)families.get (familyName);
if (family == null)
{
family = new FamilyClusterInfoImpl (familyName, targets, viewId);
families.put (familyName, family);
}
else
{
// no need to initialize: it is already done: we keep the same object
//
family.updateClusterInfo (targets, viewId); // should not happen: possible if redeploy after undeploy fails
}
return family;
|
|