public abstract class Host extends Object implements 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 List |
hosts
The available hosts
|
protected static int |
NO_REGISTRY
Indicates an unstarted RMI registry
|
| Modifier | Constructor and Description |
|---|---|
protected |
Host(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,
String systemName,
RemoteTestModuleIF client) |
protected void |
addSystem(String name,
String systemDirectory)
Adds a GemFire system with the given system directory to this
host.
|
protected void |
addVM(int pid,
String systemName,
RemoteTestModuleIF client)
Adds a VM to this
Host with the given process id and client record. |
boolean |
equals(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
|
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(String systemName)
Returns the GemFire system with the give name
|
String |
toString() |
protected static List hosts
protected static int NO_REGISTRY
protected Host(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 hostIllegalArgumentException - n is more than the number of hostspublic String getHostName()
public int getVMCount()
public VM getVM(int n)
n - A zero-based identifier of the VMIllegalArgumentException - n is more than the number of VMsprotected void addVM(int pid,
String systemName,
RemoteTestModuleIF client)
Host with the given process id and client record.public static VM getLocator()
protected void addLocator(int pid,
String systemName,
RemoteTestModuleIF client)
public int getSystemCount()
public GemFireSystem getSystem(int n)
n - A zero-based identifier of the GemFire systemIllegalArgumentException - n is more than the number of GemFire systemsprotected void addSystem(String name, String systemDirectory)
public GemFireSystem systemNamed(String systemName)
public boolean equals(Object o)
Hosts are considered equal if they have the same
name.Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.