List of usage examples for java.rmi.dgc VMID VMID
public VMID()
From source file:blue.automation.Parameter.java
/** Creates a new instance of Parameter */ public Parameter() { line = new Line(false); line.addTableModelListener(this); uniqueId = Integer.toString(new VMID().hashCode()); }
From source file:blue.components.lines.Line.java
private Line(boolean rightBound, boolean init) { if (init) {/*from w w w. j ava 2 s. com*/ LinePoint point1 = new LinePoint(); point1.setLocation(0.0f, 0.5f); points.add(point1); if (rightBound) { LinePoint point2 = new LinePoint(); point2.setLocation(1.0f, 0.5f); points.add(point2); } } this.rightBound = rightBound; this.color = new Color(128, 128, 128); uniqueID = Integer.toString(new VMID().hashCode()); }
From source file:org.artifactory.util.HttpUtils.java
/** * Calculate a unique id for the VM to support Artifactories with the same ip (e.g. accross NATs) *///from w w w .j a va 2 s .c om public static String getHostId() { if (StringUtils.isNotBlank(ConstantValues.hostId.getString())) { return ConstantValues.hostId.getString(); } if (VM_HOST_ID == null) { VMID vmid = new VMID(); VM_HOST_ID = vmid.toString(); } return VM_HOST_ID; }
From source file:net.sf.ehcache.constructs.asynchronous.AsynchronousCommandExecutor.java
/** * Generates an ID that is guaranteed to be unique for all VM invocations on a machine with a * given IP address.//from w w w. ja va 2 s. c om * * @return A String representation of the unique identifier. */ String generateUniqueIdentifier() { VMID guid = new VMID(); return guid.toString(); }
From source file:org.firstopen.singularity.util.HibernateUtilImpl.java
public String generateUUID() { VMID vmid = new VMID(); return vmid.toString(); }
From source file:se.trixon.jota.client.Client.java
void connectToServer() throws NotBoundException, MalformedURLException, RemoteException, java.rmi.ConnectException, java.rmi.ConnectIOException, java.rmi.UnknownHostException, SocketException { mRmiNameServer = JotaHelper.getRmiName(mHost, mPortHost, JotaServer.class); mServerCommander = (ServerCommander) Naming.lookup(mRmiNameServer); mManager.setServerCommander(mServerCommander); mClientVmid = new VMID(); Xlog.timedOut(String.format("server found at %s.", mRmiNameServer)); Xlog.timedOut(String.format("server vmid: %s", mServerCommander.getVMID())); Xlog.timedOut(String.format("client connected to %s", mRmiNameServer)); Xlog.timedOut(String.format("client vmid: %s", mClientVmid.toString())); mServerCommander.registerClient(this, SystemHelper.getHostname()); }
From source file:se.trixon.jota.server.Server.java
private void startServer() { mRmiNameServer = JotaHelper.getRmiName(SystemHelper.getHostname(), mPort, JotaServer.class); try {/*from w ww . j av a 2 s .c o m*/ LocateRegistry.createRegistry(mPort); mServerVmid = new VMID(); //mServerOptions = new ServerOptions(); Naming.rebind(mRmiNameServer, this); String message = String.format("started: %s (%s)", mRmiNameServer, mServerVmid.toString()); Xlog.timedOut(message); listJobs(); listTasks(); getStatus(); if (mOptions.isCronActive()) { cronOn(); } } catch (IllegalArgumentException e) { Xlog.timedErr(e.getLocalizedMessage()); Jota.exit(); } catch (RemoteException e) { //nvm - server was running Xlog.timedErr(e.getLocalizedMessage()); Jota.exit(); } catch (MalformedURLException ex) { Xlog.timedErr(ex.getLocalizedMessage()); Jota.exit(); } }