1 22 package org.jboss.ha.framework.interfaces; 23 24 import java.util.Hashtable ; 25 import java.util.List ; 26 27 47 48 public class ClusteringTargetsRepository 49 { 50 52 54 protected static Hashtable families = new Hashtable (); 55 56 58 public synchronized static FamilyClusterInfo initTarget (String familyName, List targets) 59 { 60 return initTarget (familyName, targets, 0L); 61 } 62 63 public synchronized static FamilyClusterInfo initTarget (String familyName, List targets, long viewId) 64 { 65 FamilyClusterInfoImpl family = (FamilyClusterInfoImpl)families.get (familyName); 69 if (family == null) 70 { 71 family = new FamilyClusterInfoImpl (familyName, targets, viewId); 72 families.put (familyName, family); 73 } 74 else 75 { 76 family.updateClusterInfo (targets, viewId); } 80 81 return family; 82 83 } 84 85 public static FamilyClusterInfo getFamilyClusterInfo (String familyName) 86 { 87 return (FamilyClusterInfo)families.get (familyName); 88 } 89 90 92 private ClusteringTargetsRepository () {} 93 94 96 98 100 102 104 106 108 } 109 | Popular Tags |