public abstract class Host
extends java.lang.Object
implements java.io.Serializable
This class represents a host on which a remote method may be invoked. It provides access to the VMs and GemFire systems that run on that host.
Additionally, it provides access to the Java RMI registry that runs on the host. By default, an RMI registry is only started on the host on which Hydra's Master VM runs. RMI registries may be started on other hosts via additional Hydra configuration.
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.List |
hosts
The available hosts
|
protected static int |
NO_REGISTRY
Indicates an unstarted RMI registry
|
| Modifier | Constructor and Description |
|---|---|
protected |
Host(java.lang.String hostName)
Creates a new
Host with the given name |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addHost(Host host)
Makes note of a new
Host |
protected void |
addLocator(int pid,
java.lang.String systemName,
RemoteTestModuleIF client) |
protected void |
addSystem(java.lang.String name,
java.lang.String systemDirectory)
Adds a GemFire system with the given system directory to this
host.
|
protected void |
addVM(int pid,
java.lang.String systemName,
RemoteTestModuleIF client)
Adds a VM to this
Host with the given process id and client record. |
boolean |
equals(java.lang.Object o)
Two
Hosts are considered equal if they have the same
name. |
static Host |
getHost(int n)
Returns a given host
|
static int |
getHostCount()
Returns the number of known hosts
|
java.lang.String |
getHostName()
Returns the machine name of this host
|
static VM |
getLocator() |
GemFireSystem |
getSystem(int n)
Returns a GemFire system that runs on this host
|
int |
getSystemCount()
Returns the number of GemFire systems that run on this host
|
VM |
getVM(int n)
Returns a VM that runs on this host
|
int |
getVMCount()
Returns the number of VMs that run on this host
|
int |
hashCode()
A
Host's hash code is based on the hash code of its
name. |
GemFireSystem |
systemNamed(java.lang.String systemName)
Returns the GemFire system with the give name
|
java.lang.String |
toString() |
protected static java.util.List hosts
protected static int NO_REGISTRY
protected Host(java.lang.String hostName)
Host with the given namepublic static int getHostCount()
protected static void addHost(Host host)
Hostpublic static Host getHost(int n)
n - A zero-based identifier of the hostjava.lang.IllegalArgumentException - n is more than the number of hostspublic java.lang.String getHostName()
public int getVMCount()
public VM getVM(int n)
n - A zero-based identifier of the VMjava.lang.IllegalArgumentException - n is more than the number of VMsprotected void addVM(int pid,
java.lang.String systemName,
RemoteTestModuleIF client)
Host with the given process id and client record.public static VM getLocator()
protected void addLocator(int pid,
java.lang.String systemName,
RemoteTestModuleIF client)
public int getSystemCount()
public GemFireSystem getSystem(int n)
n - A zero-based identifier of the GemFire systemjava.lang.IllegalArgumentException - n is more than the number of GemFire systemsprotected void addSystem(java.lang.String name,
java.lang.String systemDirectory)
public GemFireSystem systemNamed(java.lang.String systemName)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
Hosts are considered equal if they have the same
name.equals in class java.lang.Objectpublic int hashCode()
Host's hash code is based on the hash code of its
name.hashCode in class java.lang.ObjectCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.