|
||||||||||
| 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.Domain
public class Domain
Class for holding domain information.
| Field Summary |
|---|
| Fields inherited from class jgroup.relacs.types.EndPointImpl |
|---|
address, local, port, SIZE |
| Constructor Summary | |
|---|---|
Domain()
Constructor for deserialization. |
|
Domain(Domain domain,
boolean copyHosts)
Constructs a domain from another domain object. |
|
Domain(java.lang.String domainName)
|
|
Domain(java.lang.String domainName,
java.lang.String mcastAdr,
int mcastPort)
|
|
Domain(java.lang.String domainName,
java.lang.String mcastAdr,
int mcastPort,
int jdaemons)
|
|
| Method Summary | |
|---|---|
boolean |
addHost(Host host)
Add a host to this domain. |
boolean |
allDaemons()
Returns true if all hosts in this domain should have a daemon. |
void |
clearStatus()
Clear out the status map to avoid that the socket status remote reference objects are propagated from one experiment to the next. |
java.lang.Object |
clone()
Returns a shallow copy of this Domain instance. |
static void |
commit(java.lang.String pattern)
Commit the currently configured reachability pattern, essentially activating the pattern. |
int |
compareTo(java.lang.Object obj)
Compares this object with the specified object for ordering the objects. |
void |
decReplicaCount()
|
java.lang.Object |
get(java.lang.String key)
Retrieve the value associated with this domain for the given key. |
EndPoint |
getEndpoint()
|
HostSet |
getHostSet()
Returns the HostSet for the hosts in this domain. |
java.lang.String |
getName()
Returns the domain name. |
int |
getReplicaCount()
|
boolean |
hasNoDaemons()
Returns true if this domain should not have any daemons. |
void |
incReplicaCount()
|
boolean |
isEmpty()
Returns true if there are no hosts in this domain; false otherwise. |
boolean |
isLocal()
Returns true if this is a local domain. |
boolean |
isMulticastEndPoint()
Returns true always, since a domain endpoint must be a multicast endpoint. |
void |
merge(Domain domain)
Inject a merge on this domain so that it becomes reachable from the given domain. |
int |
numOfDaemons()
Returns the number of daemons that should reside in this domain. |
void |
partition(Domain domain)
Inject a partition on this domain so that it becomes unreachable from the given domain. |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Associate the given value with this domain under the given key. |
void |
readExternal(java.io.ObjectInput in)
Restores the content of this object from the marshalled data contained in the specified input stream. |
void |
setLocal(boolean local)
Set the local flag for this domain. |
void |
setReplicaCount(int newReplicaCount)
|
int |
size()
Returns the number of hosts contained in this domain. |
java.lang.String |
toString()
Returns a string representation of this object |
java.lang.String |
toString(boolean full)
Returns a string representation of this object |
void |
writeExternal(java.io.ObjectOutput out)
Marshals the content of this object to the specified output stream. |
| Methods inherited from class jgroup.relacs.types.EndPointImpl |
|---|
equals, getAddress, getIntAddress, getPort, hashCode |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Domain()
public Domain(Domain domain,
boolean copyHosts)
copyHosts
parameter is set to false, no hosts will be copied from the domain object.
domain - the domain to copycopyHosts - if true, the internal host set of the provided domain
is also copied; otherwise the internal host set will be empty.
public Domain(java.lang.String domainName)
throws java.net.UnknownHostException
java.net.UnknownHostException
public Domain(java.lang.String domainName,
java.lang.String mcastAdr,
int mcastPort)
throws java.net.UnknownHostException
java.net.UnknownHostException
public Domain(java.lang.String domainName,
java.lang.String mcastAdr,
int mcastPort,
int jdaemons)
throws java.net.UnknownHostException
java.net.UnknownHostException| Method Detail |
|---|
public boolean isLocal()
isLocal in interface EndPointisLocal in class EndPointImplpublic boolean isMulticastEndPoint()
isMulticastEndPoint in interface EndPointisMulticastEndPoint in class EndPointImplpublic void setLocal(boolean local)
public java.lang.String getName()
public EndPoint getEndpoint()
public int size()
public boolean isEmpty()
public HostSet getHostSet()
HostSet for the hosts in this domain.
public boolean addHost(Host host)
host - The host to add to this domain.
Domain did not already contain this host.public java.lang.Object get(java.lang.String key)
public java.lang.Object put(java.lang.String key,
java.lang.Object value)
public boolean allDaemons()
public boolean hasNoDaemons()
public int numOfDaemons()
public void decReplicaCount()
public void incReplicaCount()
public int getReplicaCount()
public void setReplicaCount(int newReplicaCount)
public java.lang.Object clone()
Domain instance.
(The elements themselves are not copied.)
clone in class java.lang.ObjectDomain instance.public int compareTo(java.lang.Object obj)
compareTo in interface java.lang.ComparablecompareTo in class EndPointImplpublic java.lang.String toString()
toString in class EndPointImplpublic java.lang.String toString(boolean full)
public void readExternal(java.io.ObjectInput in)
throws java.lang.ClassNotFoundException,
java.io.IOException
readExternal in interface java.io.ExternalizablereadExternal in class EndPointImplin - the stream to be read
java.lang.ClassNotFoundException
java.io.IOException
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class EndPointImplout - the stream to be written
java.io.IOExceptionpublic void partition(Domain domain)
commit() method below.
public void merge(Domain domain)
commit() method below.
public static void commit(java.lang.String pattern)
partition() or merge() method, otherwise an
IllegalStateException is thrown. It cannot be called multiple
times per call to partition() or merge().
public void clearStatus()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||