cgl.narada.service.reliable.events
Class RdArchivalServiceNotification

java.lang.Object
  extended by cgl.narada.service.reliable.events.RdArchivalServiceNotification
All Implemented Interfaces:
Comparator

public class RdArchivalServiceNotification
extends Object
implements Comparator

This class encapsulates the notification issued by the reliable service after it has archived an event. Among other things, the event contains information pertaining to (a) The event id of the archived event (b) The sequence number of the archived event (c) The sequence number of previously archived events (d) The template id


Constructor Summary
RdArchivalServiceNotification(byte[] marshalledBytes)
          Reconstruction of the event from the serialized byte stream representation
RdArchivalServiceNotification(int templateId, EventID eventId, long sequenceNumber, long previousSequenceNumber)
           
 
Method Summary
 int compare(Object one, Object two)
          For this implementation it is assumed that the entity id and template id of the compared objects are the same.
 boolean equals(Object obj)
          For this implementation it is assumed that the entity id and template id of the compared object is the same
 byte[] getBytes()
          Create a serialized representation of the byte stream
 EventID getEventId()
          Retriev the event identifier of the archived event
 long getPreviousSequenceNumber()
          Retrieves the previous sequence number for this event
 long getSequenceNumber()
          Retrieves the sequence number for this event
 int getTemplateId()
          Retrieves the templateId of the archived event
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RdArchivalServiceNotification

public RdArchivalServiceNotification(int templateId,
                                     EventID eventId,
                                     long sequenceNumber,
                                     long previousSequenceNumber)

RdArchivalServiceNotification

public RdArchivalServiceNotification(byte[] marshalledBytes)
Reconstruction of the event from the serialized byte stream representation

Method Detail

getTemplateId

public int getTemplateId()
Retrieves the templateId of the archived event


getEventId

public EventID getEventId()
Retriev the event identifier of the archived event


getSequenceNumber

public long getSequenceNumber()
Retrieves the sequence number for this event


getPreviousSequenceNumber

public long getPreviousSequenceNumber()
Retrieves the previous sequence number for this event


toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
For this implementation it is assumed that the entity id and template id of the compared object is the same

Specified by:
equals in interface Comparator
Overrides:
equals in class Object

compare

public int compare(Object one,
                   Object two)
For this implementation it is assumed that the entity id and template id of the compared objects are the same. We only deal with the catenation numbers here. This plays a role in the SortedSet being maintain in the RdsEventPercolator

Specified by:
compare in interface Comparator

getBytes

public byte[] getBytes()
Create a serialized representation of the byte stream



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