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 |
|---|---|
static java.lang.String |
BASE_LOGGER_NAME |
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,
RemoteDUnitVMIF client) |
protected void |
addVM(int pid,
RemoteDUnitVMIF 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() |
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. |
java.lang.String |
toString() |
protected static java.util.List hosts
protected static int NO_REGISTRY
public static final java.lang.String BASE_LOGGER_NAME
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,
RemoteDUnitVMIF client)
Host with the given process id and client record.public static VM getLocator()
protected void addLocator(int pid,
RemoteDUnitVMIF client)
public int getSystemCount()
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.Object