org.jgroups.protocols.tom
Class SenderManager

java.lang.Object
  extended by 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
static long NOT_READY
           
 
Constructor Summary
SenderManager()
           
 
Method Summary
 void addNewMessageToSend(MessageID messageID, java.util.Collection<Address> destinations, long initialSequenceNumber, boolean deliverToMyself)
          Add a new message sent
 long addPropose(MessageID messageID, Address from, long sequenceNumber)
          Add a propose from a member in destination set
 void clear()
          removes all pending messages
 java.util.Set<Address> getDestination(MessageID messageID)
          obtains the destination set of a message
 boolean markSent(MessageID messageID)
          Mark the message as sent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_READY

public static final long NOT_READY
See Also:
Constant Field Values
Constructor Detail

SenderManager

public SenderManager()
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 ID
destinations - the destination set
initialSequenceNumber - the initial sequence number
deliverToMyself - 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 ID
from - the originator of the propose
sequenceNumber - 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



Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.