Package org.jgroups.protocols.tom
Class SenderManager
- java.lang.Object
-
- org.jgroups.protocols.tom.SenderManager
-
public class SenderManager extends java.lang.Object
Keeps track of all sent messages, until the final sequence number is known- Since:
- 3.1
- Author:
- Pedro Ruivo
-
-
Field Summary
Fields Modifier and Type Field Description static long
NOT_READY
-
Constructor Summary
Constructors Constructor Description SenderManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNewMessageToSend(MessageID messageID, java.util.Collection<Address> destinations, long initialSequenceNumber, boolean deliverToMyself)
Add a new message sentlong
addPropose(MessageID messageID, Address from, long sequenceNumber)
Add a propose from a member in destination setvoid
clear()
removes all pending messagesjava.util.Set<Address>
getDestination(MessageID messageID)
obtains the destination set of a messagejava.util.Collection<MessageID>
getPendingMessageIDs()
boolean
markSent(MessageID messageID)
Mark the message as sentlong
removeLeavers(MessageID messageID, java.util.Collection<Address> leavers)
-
-
-
Field Detail
-
NOT_READY
public static final long NOT_READY
- See Also:
- Constant Field Values
-
-
Method Detail
-
addNewMessageToSend
public void addNewMessageToSend(MessageID messageID, java.util.Collection<Address> destinations, long initialSequenceNumber, boolean deliverToMyself)
Add a new message sent- Parameters:
messageID
- the message IDdestinations
- the destination setinitialSequenceNumber
- the initial sequence numberdeliverToMyself
- true if *this* member is in destination sent, false otherwise
-
addPropose
public long addPropose(MessageID messageID, Address from, long sequenceNumber)
Add a propose from a member in destination set- Parameters:
messageID
- the message IDfrom
- the originator of the proposesequenceNumber
- the proposed sequence number- Returns:
- NOT_READY if the final sequence number is not know, or the final sequence number
-
markSent
public boolean markSent(MessageID messageID)
Mark the message as sent- Parameters:
messageID
- the message ID- Returns:
- return true if *this* member is in destination set
-
getDestination
public java.util.Set<Address> getDestination(MessageID messageID)
obtains the destination set of a message- Parameters:
messageID
- the message ID- Returns:
- the destination set
-
clear
public void clear()
removes all pending messages
-
getPendingMessageIDs
public java.util.Collection<MessageID> getPendingMessageIDs()
-
-