/** * @param buff * the String buffer to write in. * @param indent * the ident value. */ private void writePoolToXml(final StringBuffer buff, final int indent) { // TODO Auto-generated method stub buff.append(indent); if (poolConfiguration != null) { writeValue(new Integer(poolConfiguration.getMax()).toString(), buff, "<max-size>", "</max-size>"); writeValue(new Integer(poolConfiguration.getMaxWaiters()) .toString(), buff, "<max-waiters>", "</max-waiters>"); writeValue(new Long(poolConfiguration.getTimeout()).toString(), buff, "<timeout>", "</timeout>"); } }
/** * Returns the max waiters of pool of CMIReferenceable for a object with the given name. * @param objectName a name of object * @return the maximal waiters of pool of CMIReferenceable for a object with the given name * @throws IllegalArgumentException if none object has the given name */ public Integer getMaxPoolWaiters(final String objectName) throws IllegalArgumentException { try { return clusterViewManager.getPoolConfiguration(objectName).getMaxWaiters(); } catch (ObjectNotFoundException e) { LOGGER.error("Object not found: {0}", objectName, e); throw new IllegalArgumentException("Object not found: " + objectName + "\n" + e.getMessage()); } }