/** * Assigns a free port to be the listener port. * * @throws IllegalStateException if the statis of the listener is not {@link net.sf.ehcache.Status#STATUS_UNINITIALISED} */ protected void assignFreePort(boolean forced) throws IllegalStateException { if (status != Status.STATUS_UNINITIALISED) { throw new IllegalStateException("Cannot change the port of an already started listener."); } this.port = Integer.valueOf(this.getFreePort()); if (forced) { LOG.warn("Resolving RMI port conflict by automatically using a free TCP/IP port to listen on: " + this.port); } else { LOG.debug("Automatically finding a free TCP/IP port to listen on: " + this.port); } }
/** * Assigns a free port to be the listener port. * * @throws IllegalStateException if the statis of the listener is not {@link net.sf.ehcache.Status#STATUS_UNINITIALISED} */ protected void assignFreePort(boolean forced) throws IllegalStateException { if (status != Status.STATUS_UNINITIALISED) { throw new IllegalStateException("Cannot change the port of an already started listener."); } this.port = Integer.valueOf(this.getFreePort()); if (forced) { LOG.warn("Resolving RMI port conflict by automatically using a free TCP/IP port to listen on: " + this.port); } else { LOG.debug("Automatically finding a free TCP/IP port to listen on: " + this.port); } }
/** * Assigns a free port to be the listener port. * * @throws IllegalStateException if the statis of the listener is not {@link net.sf.ehcache.Status#STATUS_UNINITIALISED} */ protected void assignFreePort(boolean forced) throws IllegalStateException { if (status != Status.STATUS_UNINITIALISED) { throw new IllegalStateException("Cannot change the port of an already started listener."); } this.port = Integer.valueOf(this.getFreePort()); if (forced) { LOG.warn("Resolving RMI port conflict by automatically using a free TCP/IP port to listen on: " + this.port); } else { LOG.debug("Automatically finding a free TCP/IP port to listen on: " + this.port); } }
/** * Assigns a free port to be the listener port. * * @throws IllegalStateException if the statis of the listener is not {@link net.sf.ehcache.Status#STATUS_UNINITIALISED} */ protected void assignFreePort(boolean forced) throws IllegalStateException { if (status != Status.STATUS_UNINITIALISED) { throw new IllegalStateException("Cannot change the port of an already started listener."); } this.port = Integer.valueOf(this.getFreePort()); if (forced) { LOG.warn("Resolving RMI port conflict by automatically using a free TCP/IP port to listen on: " + this.port); } else { LOG.debug("Automatically finding a free TCP/IP port to listen on: " + this.port); } }