/** * Sets the pool timeout of CMIReferenceable for a object with the given name. * @param objectName a name of object * @param poolTimeout the timeout of pool of CMIReferenceable for a object with the given name * @throws IllegalArgumentException if no object is bound with the given name * @throws UnsupportedOperationException if the used manager is at client-side */ public void setPoolTimeout(final String objectName, final Long poolTimeout) throws IllegalArgumentException, UnsupportedOperationException { if(!(clusterViewManager instanceof ServerClusterViewManager)) { LOGGER.error("Clients cannot call this method"); throw new UnsupportedOperationException("Clients cannot call this method"); } try { IPoolConfiguration poolConfiguration = clusterViewManager.getPoolConfiguration(objectName); poolConfiguration.setTimeout(poolTimeout); ((ServerClusterViewManager) clusterViewManager).getPool(objectName).setPoolConfiguration(poolConfiguration); } catch (ObjectNotFoundException e) { LOGGER.error("Object not found: {0}", objectName, e); throw new IllegalArgumentException("Object not found: " + objectName + "\n" + e.getMessage()); } }