/** * Returns true if the object with the given name has a pool of CMIReferenceable. * @param objectName a name of object * @return true if the object with the given name has a pool of CMIReferenceable */ protected final boolean hasPool(final String objectName) { localObjectData.putIfAbsent(objectName, new LocalObjectData(objectName)); return localObjectData.get(objectName).getPool() != null; }
/** * Returns the instance of LB policy associated with the given name of object. * @param objectName a name of object * @return the instance of LB policy associated with the given name of object */ public final IPolicy<CMIReference> getPolicy(final String objectName) { localObjectData.putIfAbsent(objectName, new LocalObjectData(objectName)); return localObjectData.get(objectName).getPolicy(); }
/** * Associates a name of object with a pool of CMIReferenceable. * @param objectName a name of object * @param pool a pool of CMIReferenceable */ public final void setPool(final String objectName, final Pool<CMIReferenceable<?>, CMIReference> pool) { localObjectData.putIfAbsent(objectName, new LocalObjectData(objectName)); localObjectData.get(objectName).setPool(pool); }
/** * Associates a name of of object with an instance of LB policy. * @param objectName a name of object * @param lbPolicy an instance of LB policy to associate with the given object */ private void setPolicy(final String objectName, final IPolicy<CMIReference> lbPolicy) { localObjectData.putIfAbsent(objectName, new LocalObjectData(objectName)); localObjectData.get(objectName).setPolicy(lbPolicy); }
/** * Returns a pool of CMIReferenceable for an object with the given name. * @param objectName a name of object * @return a pool of CMIReferenceable for an object with the given name */ public final Pool<CMIReferenceable<?>, CMIReference> getPool(final String objectName) { localObjectData.putIfAbsent(objectName, new LocalObjectData(objectName)); return localObjectData.get(objectName).getPool(); }