|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjgroup.relacs.types.EndPointImpl
jgroup.relacs.config.Host
public class Host
The Host
class contains information about a single host
in a domain.
Nested Class Summary | |
---|---|
static class |
Host.ReplicaState
Replica state constants |
Field Summary |
---|
Fields inherited from class jgroup.relacs.types.EndPointImpl |
---|
address, local, port, SIZE |
Constructor Summary | |
---|---|
Host()
Default constructor for externalization |
|
Host(java.lang.String hostName,
Domain domain,
int port)
Construct a new Host object containing information
about the domain, the host and the port number for an entry in the
HostSet . |
Method Summary | |
---|---|
void |
assign(AppConfig app)
Assign the app replica to this host. |
boolean |
contains(AppConfig app)
|
boolean |
createReplica(AppConfig app)
Create a replica for the given app on this host. |
java.lang.Object |
get(java.lang.String key)
Retrieve the value associated with this host for the given key. |
java.lang.String |
getCanonicalHostName()
Returns the fully qualified domain name (host name and domain name) for this Host object. |
java.util.Map<java.lang.String,java.lang.Object> |
getContentMap()
|
Domain |
getDomain()
Returns the Domain object associated with
this Host object. |
java.lang.String |
getDomainName()
Returns the domain name for this Host object,
excluding the host name component. |
java.lang.String |
getHostName()
Returns the host name for this Host object,
excluding the domain name component. |
Host.ReplicaState |
getState(AppConfig app)
Returns the current replica state of the given application on this host. |
boolean |
isAvailable()
Returns true if the host is available; otherwise false. |
boolean |
isJoining(AppConfig app)
Returns true if the given application is currently joining at this host. |
java.util.Iterator<AppConfig> |
iterator()
|
java.rmi.Remote |
lookup(java.lang.String name)
|
boolean |
ping()
Returns true if this host responded to a ping invocation of its ExecService . |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Associate the given value with this host under the given key. |
java.util.Set<ClassData> |
queryReplicas()
Return the set of replicas running on this host as reported by the ExecDaemon. |
void |
remove(AppConfig app)
|
boolean |
removeReplica(AppConfig app)
Remove the replica for app running on host . |
int |
replicaCount()
|
void |
setContentMap(java.util.Map<java.lang.String,java.lang.Object> c)
|
void |
shutdown(int delay)
Request the execution service on this host to shutdown. |
void |
suspect()
Convenience method to update this hosts reachability status. |
void |
viewChange(AppConfig app)
Mark the given application as in the normal state. |
Methods inherited from class jgroup.relacs.types.EndPointImpl |
---|
compareTo, equals, getAddress, getIntAddress, getPort, hashCode, isLocal, isMulticastEndPoint, readExternal, toString, writeExternal |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Host()
public Host(java.lang.String hostName, Domain domain, int port) throws java.net.UnknownHostException
Host
object containing information
about the domain, the host and the port number for an entry in the
HostSet
.
java.net.UnknownHostException
Method Detail |
---|
public java.lang.String getCanonicalHostName()
Host
object.
public java.lang.String getHostName()
Host
object,
excluding the domain name component.
public java.lang.String getDomainName()
Host
object,
excluding the host name component.
public Domain getDomain()
Domain
object associated with
this Host
object.
public java.util.Iterator<AppConfig> iterator()
iterator
in interface java.lang.Iterable<AppConfig>
public boolean contains(AppConfig app)
public int replicaCount()
public void assign(AppConfig app)
app
replica to this host.
app
- public void remove(AppConfig app)
public java.lang.Object get(java.lang.String key)
public java.lang.Object put(java.lang.String key, java.lang.Object value)
public java.util.Map<java.lang.String,java.lang.Object> getContentMap()
public void setContentMap(java.util.Map<java.lang.String,java.lang.Object> c)
public boolean isAvailable()
public void suspect()
public boolean ping()
ExecService
. False is returned otherwise.
public java.rmi.Remote lookup(java.lang.String name) throws java.rmi.AccessException, java.net.UnknownHostException, java.rmi.RemoteException, java.rmi.NotBoundException
java.rmi.AccessException
java.net.UnknownHostException
java.rmi.RemoteException
java.rmi.NotBoundException
public boolean createReplica(AppConfig app)
app
on this host.
app
- The app
for which to create a replica.
public boolean removeReplica(AppConfig app)
app
running on host
.
app
- The app
whose replica to remove.host
- The host
from which to remove the given replica.
public java.util.Set<ClassData> queryReplicas()
public boolean isJoining(AppConfig app)
public Host.ReplicaState getState(AppConfig app)
public void viewChange(AppConfig app)
public void shutdown(int delay)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |