|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MemberId
A class implementing this interface uniquely identify a member object in a group.
A member identifier is composed by three parts:
MemberId
is created, its IP address and its
incarnation time are set equal to each member id created in that
Java virtual machine. So, the identifiers of members hosted in the
same Java virtual machine differs only for the member counter. Member ids may be compared in the following ways:
MembersId
s are equal (method equals)
if and only if they have the same IP address, the same incarnation
time and the same member counter; MembersId
s are neighbours (method
isNeighbour) if and only if they have the same IP address
and the same incarnation time; i.e., if they are hosted in the same
virtual machine;MembersId
is newer than another
MembersId
(method isNewer) if and only if
their IP addresses are the same and the incarnation time of the
former id is greater than the incarnation time of the latter id; in
other words, if the Java virtual machine hosting the latter member
id has crashed (freeing the control over the UDP port) and then
recovered.
Method Summary | |
---|---|
java.lang.String |
getCanonicalHostName()
Returns the canonical hostname associated with the JVM on which the member is running. |
EndPoint |
getEndPoint()
Returns the EndPoint (IP, port) of the java virtual machine hosting this member. |
LocalId |
getLocalId()
Returns a LocalId object used to distinguish this particular member from other members of the same group hosted in the same Java virtual machine. |
int |
getServerPort()
Returns the server port associated with this member host. |
net.jini.jeri.Endpoint |
getTcpEndpoint()
Returns the TcpEndpoint of this member. |
boolean |
isNeighbour(MemberId id)
Returns true if and only if this member id and the specified member id have the same IP address and the same incarnation time; i.e., if they are hosted in the same virtual machine. |
boolean |
isNewer(MemberId id)
Returns true if and only if the IP addresses of this member id and the specified id are the same, and the incarnation time of the former is greater than the incarnation time of the latter; in other words, if the Java virtual machine hosting the specified member id has crashed and then recovered. |
Methods inherited from interface java.io.Externalizable |
---|
readExternal, writeExternal |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
EndPoint getEndPoint()
net.jini.jeri.Endpoint getTcpEndpoint()
LocalId getLocalId()
java.lang.String getCanonicalHostName()
int getServerPort()
boolean isNewer(MemberId id)
boolean isNeighbour(MemberId id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |