@Override public String getHostName(InetAddress ip_addr) { return SocketCreator.getHostName(ip_addr); } @Override
@Override public String toString() { StringBuilder result = new StringBuilder(); result.append(diskStoreID); if(host != null) { result.append(" ["); result.append(SocketCreator.getHostName(host)); result.append(":"); result.append(directory); result.append("]"); } return result.toString(); }
@Override public String toString() { StringBuilder result = new StringBuilder(); result.append(diskStoreID); if(host != null) { result.append(" ["); result.append(SocketCreator.getHostName(host)); result.append(":"); result.append(directory); result.append("]"); } return result.toString(); }
/** * Returns the path to this sampler's system directory; if it has one. */ @Override public final String getSystemDirectoryPath() { try { return SocketCreator.getHostName(SocketCreator.getLocalHost()); } catch (UnknownHostException ignore) { return ""; } }
/** * Returns the path to this sampler's system directory; if it has one. */ @Override public final String getSystemDirectoryPath() { try { return SocketCreator.getHostName(SocketCreator.getLocalHost()); } catch (UnknownHostException ignore) { return ""; } }
protected String getMachineInfo() { String machineInfo = System.getProperty("os.arch"); try { String hostName = SocketCreator.getHostName(SocketCreator.getLocalHost()); machineInfo += " " + hostName; } catch (UnknownHostException ignore) { } return machineInfo; }
protected String getMachineInfo() { String machineInfo = System.getProperty("os.arch"); try { String hostName = SocketCreator.getHostName(SocketCreator.getLocalHost()); machineInfo += " " + hostName; } catch (UnknownHostException ignore) { } return machineInfo; }
public String getStartLocator() { if (this.startLocatorPort > 0) { if (this.bindAddress != null) { return this.bindAddress + "["+this.startLocatorPort+"]"; } try { return SocketCreator.getHostName(SocketCreator.getLocalHost()) + "["+this.startLocatorPort+"]"; } catch (UnknownHostException e) { // punt and use this.startLocator instead } } return this.startLocator; }
public String getStartLocator() { if (this.startLocatorPort > 0) { if (this.bindAddress != null) { return this.bindAddress + "["+this.startLocatorPort+"]"; } try { return SocketCreator.getHostName(SocketCreator.getLocalHost()) + "["+this.startLocatorPort+"]"; } catch (UnknownHostException e) { // punt and use this.startLocator instead } } return this.startLocator; }
/** * Get the string representation of this <code>Locator</code> in host[port] * format. */ public String asString() { Object ba = this.bindAddress; if (ba == null) { try { ba = SocketCreator.getHostName(SocketCreator.getLocalHost()); } catch (java.net.UnknownHostException uh) { } } StringBuilder locatorString = new StringBuilder(String.valueOf(ba)); locatorString.append('[').append(this.port).append(']'); return locatorString.toString(); }
/** * Get the string representation of this <code>Locator</code> in host[port] * format. */ public String asString() { Object ba = this.bindAddress; if (ba == null) { try { ba = SocketCreator.getHostName(SocketCreator.getLocalHost()); } catch (java.net.UnknownHostException uh) { } } StringBuilder locatorString = new StringBuilder(String.valueOf(ba)); locatorString.append('[').append(this.port).append(']'); return locatorString.toString(); }
/** * Returns a string representation of the object. * * @return a string representation of the object */ @Override public String toString() { StringBuilder sb = new StringBuilder(); // if bindAddress then use that instead of host... if (this.bindAddress != null && this.bindAddress.length() > 0) { sb.append(this.bindAddress); } else { if (isMcastId()) { sb.append(this.host.getHostAddress()); } else { sb.append(SocketCreator.getHostName(this.host)); } } sb.append("[").append(this.port).append("]"); return sb.toString(); }
/** * Returns a string representation of the object. * * @return a string representation of the object */ @Override public String toString() { StringBuffer sb = new StringBuffer(); // if bindAddress then use that instead of host... if (this.bindAddress != null && this.bindAddress.length() > 0) { sb.append(this.bindAddress); } else { if (isMcastId()) { sb.append(this.host.getHostAddress()); } else { sb.append(SocketCreator.getHostName(this.host)); } } sb.append("[").append(this.port).append("]"); return sb.toString(); }
/** * Creates a new <code>ManagedEntityConfigImpl</code> based on the * configuration of a running <code>GemFireVM</code> */ protected ManagedEntityConfigImpl(GemFireVM vm) { this.host = SocketCreator.getHostName(vm.getHost()); this.workingDirectory = vm.getWorkingDirectory().getAbsolutePath(); this.productDirectory = vm.getGemFireDir().getAbsolutePath(); this.remoteCommand = null; }
/** * Creates a new <code>ManagedEntityConfigImpl</code> based on the * configuration of a running <code>GemFireVM</code> */ protected ManagedEntityConfigImpl(GemFireVM vm) { this.host = SocketCreator.getHostName(vm.getHost()); this.workingDirectory = vm.getWorkingDirectory().getAbsolutePath(); this.productDirectory = vm.getGemFireDir().getAbsolutePath(); this.remoteCommand = null; }
public String getAttribute(String attName) { Object result = getAttributeObject(attName); if (result instanceof String) { return (String)result; } if (attName.equalsIgnoreCase(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME)) { int[] value = (int[])result; return ""+value[0]+"-"+value[1]; } else if (result.getClass().isArray()) { return SystemAdmin.join((Object[])result); } else if (result instanceof InetAddress) { InetAddress addr = (InetAddress)result; String addrName = null; if (addr.isMulticastAddress() || !SocketCreator.resolve_dns) { addrName = addr.getHostAddress(); // on Windows getHostName on mcast addrs takes ~5 seconds } else { addrName = SocketCreator.getHostName(addr); } return addrName; } else { return result.toString(); } }
public String getAttribute(String attName) { Object result = getAttributeObject(attName); if (result instanceof String) { return (String)result; } if (attName.equalsIgnoreCase(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME)) { int[] value = (int[])result; return ""+value[0]+"-"+value[1]; } else if (result.getClass().isArray()) { return SystemAdmin.join((Object[])result); } else if (result instanceof InetAddress) { InetAddress addr = (InetAddress)result; String addrName = null; if (addr.isMulticastAddress() || !SocketCreator.resolve_dns) { addrName = addr.getHostAddress(); // on Windows getHostName on mcast addrs takes ~5 seconds } else { addrName = SocketCreator.getHostName(addr); } return addrName; } else { return result.toString(); } }
private PoolFactory createDefaultPF() { PoolFactory defpf = PoolManager.createFactory(); try { String localHostName = SocketCreator.getHostName(SocketCreator.getLocalHost()); defpf.addServer(localHostName, CacheServer.DEFAULT_PORT); } catch (UnknownHostException ex) { throw new IllegalStateException("Could not determine local host name"); } return defpf; }
private PoolFactory createDefaultPF() { PoolFactory defpf = PoolManager.createFactory(); try { String localHostName = SocketCreator.getHostName(SocketCreator.getLocalHost()); defpf.addServer(localHostName, CacheServer.DEFAULT_PORT); } catch (UnknownHostException ex) { throw new IllegalStateException("Could not determine local host name"); } return defpf; }
private void defaultToCurrentHost() { this.vmPid = OSProcess.getId(); try { if (SocketCreator.resolve_dns) { this.hostName = SocketCreator.getHostName(SocketCreator.getLocalHost()); } else { this.hostName = SocketCreator.getLocalHost().getHostAddress(); } } catch(UnknownHostException ee){ throw new InternalGemFireError(ee); } synchPayload(); }