Package org.jgroups.protocols.pbcast
Class Leaver
- java.lang.Object
-
- org.jgroups.protocols.pbcast.Leaver
-
public class Leaver extends java.lang.Object
Handles the leaving of a member from a group. On leave(), a LEAVE-REQ is sent to the coordinator and the caller is blocked until a LEAVE-RSP has been received.
If the coordinator changes before the response has been received, the LEAVE-REQ will be resent to the new cordinator. If the coordinator is null, leave() returns.- Since:
- 4.1.4
- Author:
- Bela Ban
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
coordChanged(Address new_coord)
Callback to notify Leaver that the coord changed.void
handleLeaveResponse(Address sender)
void
leave()
Sends a LEAVE-REQ to the coordinator.void
reset()
Interrupts and stops the current leave process (if one is in progress).protected void
sendLeaveRequest(Address coord, Address leaving_mbr)
-
-
-
Constructor Detail
-
Leaver
public Leaver(GMS gms)
-
-
Method Detail
-
leave
public void leave()
Sends a LEAVE-REQ to the coordinator. Blocks the caller until a LEAVE-RSP has been received, or no coord is found.
-
handleLeaveResponse
public void handleLeaveResponse(Address sender)
-
coordChanged
public void coordChanged(Address new_coord)
Callback to notify Leaver that the coord changed. This will result in resending the LEAVE-REQ to the new coordinator. If there's no new coord (e.g. because we're the last member),leave()
(if there is one in progress) will return and unblock the caller.
-
reset
public void reset()
Interrupts and stops the current leave process (if one is in progress). No-op is no leave process is in progress. This unblocks the caller ofleave()
(if present).
-
-