cgl.narada.service.reliable.events
Class RdNakInvoiceEntityEvent

java.lang.Object
  extended by cgl.narada.service.reliable.events.RdNakInvoiceEntityEvent

public class RdNakInvoiceEntityEvent
extends Object

This is the invoice event issued by an entity upon detection of missing archival sequences. NAK events trigger the retransmission of the missed event.


Constructor Summary
RdNakInvoiceEntityEvent(byte[] marshalledBytes)
          Reconstructing the original event from its serialized representation
RdNakInvoiceEntityEvent(int templateId, int entityId, long nakSequence)
          Initialize the Nak Invoice Event
RdNakInvoiceEntityEvent(int templateId, int entityId, long[] nakSequences)
          Initialize the Nak Invoice Event
 
Method Summary
 boolean containsNakInfo()
           
 boolean containsSingleNak()
          Allows us to inspect if the event contains a single naknowledgement or multiple ones
 byte[] getBytes()
          Returns a serialized representation of the event bytes
 int getEntityId()
           
 long getNakSequenceNumber()
           
 long[] getNakSequenceNumbers()
           
 long getRetransmissionId()
           
 int getTemplateId()
           
static void main(String[] args)
           
 void removeNakSequence(long sequenceNumber)
          This function is called by the processor
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RdNakInvoiceEntityEvent

public RdNakInvoiceEntityEvent(int templateId,
                               int entityId,
                               long nakSequence)
Initialize the Nak Invoice Event


RdNakInvoiceEntityEvent

public RdNakInvoiceEntityEvent(int templateId,
                               int entityId,
                               long[] nakSequences)
Initialize the Nak Invoice Event


RdNakInvoiceEntityEvent

public RdNakInvoiceEntityEvent(byte[] marshalledBytes)
Reconstructing the original event from its serialized representation

Method Detail

getTemplateId

public int getTemplateId()

getEntityId

public int getEntityId()

containsSingleNak

public boolean containsSingleNak()
Allows us to inspect if the event contains a single naknowledgement or multiple ones


getNakSequenceNumber

public long getNakSequenceNumber()

getNakSequenceNumbers

public long[] getNakSequenceNumbers()

getRetransmissionId

public long getRetransmissionId()

getBytes

public byte[] getBytes()
Returns a serialized representation of the event bytes


toString

public String toString()
Overrides:
toString in class Object

removeNakSequence

public void removeNakSequence(long sequenceNumber)
This function is called by the processor


containsNakInfo

public boolean containsNakInfo()

main

public static void main(String[] args)


For comments and suggestions please send e-mail to The NaradaBrokering Project