|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jgroup.relacs.daemon.Daemon
public final class Daemon
The Daemon
is the access interface for the group
membership service and reliable multicast service.
Field Summary | |
---|---|
static byte |
R_ACK
|
static byte |
R_ESTIM
|
static java.lang.String[] |
R_ExTAGS
|
static byte |
R_FORWARD
|
static byte |
R_INTEREST
|
static byte |
R_JOIN
|
static byte |
R_JOINACK
|
static byte |
R_LEAVE
|
static byte |
R_MCAST
|
static byte |
R_NOGID
|
static byte |
R_NOINTEREST
|
static byte |
R_PROP
|
static byte |
R_RESULT
|
static byte |
R_SYMM
|
static byte |
R_SYNCH
|
static java.lang.String[] |
R_TAGS
|
static byte |
R_VIEW
|
static int |
S_ESTIMATE
|
static int |
S_IDLE
|
static int |
S_SYNCH
|
Fields inherited from interface jgroup.relacs.daemon.DaemonService |
---|
DAEMON_NAME |
Fields inherited from interface jgroup.relacs.events.EventTags |
---|
DAEMON_FAILURE_EVENT, DELIVERY_ACK, DELIVERY_EVENT, INSTALL_ACK, INSTALL_EVENT, JOIN_REQUEST, LEAVE_REQUEST, MEMBER_LEFT_EVENT, MULTICAST_REQUEST, PREPARE_ACK, PREPARE_EVENT |
Fields inherited from interface jgroup.relacs.mss.MssConstants |
---|
ALL, EHANDLER_PRIORITY, HEADER_SIZE, MINIMUM_ALIVE_VALUE, MSS_HEADER_SIZE, MSSUSER_PRIORITY, NACKSUPPRESSION, NI_PRIORITY, OVERHEAD_SIZE, ROUTING_ENABLED, TRAILER_SIZE, UNDEF, UNREACHABLE |
Method Summary | |
---|---|
void |
addEvent(Event event)
Adds an event generated by a member to the local queue of events. |
static void |
bindLocalDaemon(DaemonService daemonService)
|
static Daemon |
createDaemon(TransportConfig conf)
Create a daemon object on the local host. |
MemberId |
getMemberId(EndPoint localEndPoint)
Returns a new member id for a new member. |
void |
localReceive(Event event)
Handles a message received by a local member. |
void |
localSuspect(MemberId memberId)
Invoked to notify the objects implementing this interface that a remote object is not responding to remote method invocations, and thus should be crashed. |
static DaemonService |
lookupLocalDaemon()
Obtain a remote reference for a local daemon. |
int |
members()
Returns the number of members associated with this Jgroup daemon. |
static DaemonService |
quickLookupLocalDaemon()
Lookup a local daemon without retrying. |
void |
remoteReceive(byte tag,
InMessage stream,
EndPoint src)
Handles a message received from a remote host. |
void |
remoteSuspect(EndPoint[] trset,
EndPoint[] nrset,
EndPoint[] nuset,
EndPoint[] newinc)
Handles variations in the mss-reachability |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int S_IDLE
public static final int S_SYNCH
public static final int S_ESTIMATE
public static final byte R_MCAST
public static final byte R_ACK
public static final byte R_ESTIM
public static final byte R_FORWARD
public static final byte R_SYNCH
public static final byte R_SYMM
public static final byte R_PROP
public static final byte R_VIEW
public static final byte R_RESULT
public static final byte R_NOGID
public static final byte R_INTEREST
public static final byte R_NOINTEREST
public static final byte R_LEAVE
public static final byte R_JOIN
public static final byte R_JOINACK
public static final java.lang.String[] R_TAGS
public static final java.lang.String[] R_ExTAGS
Method Detail |
---|
public static Daemon createDaemon(TransportConfig conf) throws ConfigurationException, java.io.IOException
conf
- Transport configuration parameters
java.io.IOException
- Raised if a daemon could not be created due to a problem with
port initialization. Another application (or daemon) may be
using our socket port.
ConfigurationException
- Raised if a daemon could not be created due to a
misconfiguration.public static void bindLocalDaemon(DaemonService daemonService) throws JgroupException
JgroupException
public static DaemonService lookupLocalDaemon() throws JgroupException
This method can be invoked if we are unable to bind a daemon instance to the port specifed in the distributed system configuration. This may occur on two occasions; (i) there is another daemon running on the local host, or (ii) some other application is using the specified port. The former case may also occur before the other daemon has managed to register its reference in the bootstrap registry, thus we need to retry a few times before concluding that it is some other application.
DaemonService
object
JgroupException
- Raised if no daemon could be found (e.g., not stored in the registry).public static DaemonService quickLookupLocalDaemon()
public MemberId getMemberId(EndPoint localEndPoint) throws java.rmi.RemoteException
getMemberId
in interface DaemonService
java.rmi.RemoteException
public int members() throws java.rmi.RemoteException
members
in interface DaemonService
java.rmi.RemoteException
public void addEvent(Event event) throws java.rmi.RemoteException
addEvent
in interface DaemonService
java.rmi.RemoteException
public void remoteReceive(byte tag, InMessage stream, EndPoint src)
remoteReceive
in interface MssUser
tag
- the tag identifying the type of messagestream
- the message, represented by a InMessage
objectsrc
- the sender of the messagepublic void localReceive(Event event)
localReceive
in interface MssUser
event
- represents the received messagepublic void remoteSuspect(EndPoint[] trset, EndPoint[] nrset, EndPoint[] nuset, EndPoint[] newinc)
remoteSuspect
in interface MssUser
trset
- set of all (total) reachable hostsnrset
- set of reachable hosts that were unreachablenuset
- set of unreachable hosts that were reachablenewinc
- set of hosts who has a new incarnation identifierpublic void localSuspect(MemberId memberId)
localSuspect
in interface MssUser
memberId
- a callback object identifying the suspected object;
this object has been stored in the Mss through the addPingListener
invocation on the Mss.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |