/** * Sets the location attribute of the RemoteCacheAttributes object. * <p> * @param host The new remoteHost value * @param port The new remotePort value */ @Override public void setRemoteLocation( String host, int port ) { this.location = new RemoteLocation(host, port); }
/** * Parse remote server and port from the string representation server:port and store them in * a RemoteLocation object * * @param server the input string * @return the remote location object */ public static RemoteLocation parseServerAndPort(final String server) { Matcher match = SERVER_COLON_PORT.matcher(server); if (match.find() && match.groupCount() == 2) { RemoteLocation location = new RemoteLocation( match.group(1), Integer.parseInt( match.group(2) ) ); return location; } else { log.error("Invalid server descriptor: " + server); } return null; } }