cgl.narada.matching
Class EventIdFactory

java.lang.Object
  extended by cgl.narada.matching.EventIdFactory

public class EventIdFactory
extends Object

The EventId Factory is reponsible for the generation of EventId's that are unique both in space and time.


Constructor Summary
EventIdFactory(int _clientID)
          This is used the first time a client starts issuing events
EventIdFactory(int _clientID, short _incarnationNumber)
          This is used by a client, after it has been in the disconnected mode for sometime and when it joins in it has a different incarnation number.
 
Method Summary
 EventId getNextID()
          This gets the next EventId that is a logical successor to the eventID that was previously created by the factory
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventIdFactory

public EventIdFactory(int _clientID)
This is used the first time a client starts issuing events

Parameters:
_clientID - The client ID .

EventIdFactory

public EventIdFactory(int _clientID,
                      short _incarnationNumber)
This is used by a client, after it has been in the disconnected mode for sometime and when it joins in it has a different incarnation number. This incarnation number is usually incremented every time a client joins back in.

Parameters:
_clientID - The ID assigned to the client.
_incarnationNumber - The incarnation number for the client in question.
Method Detail

getNextID

public EventId getNextID()
This gets the next EventId that is a logical successor to the eventID that was previously created by the factory

Returns:
Successor to the eventID that was previously created

main

public static void main(String[] args)


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