cgl.narada.protocol
Class DuplicateDetection

java.lang.Object
  extended by java.lang.Thread
      extended by cgl.narada.protocol.DuplicateDetection
All Implemented Interfaces:
ProtocolDebugFlags, Runnable

public class DuplicateDetection
extends Thread
implements ProtocolDebugFlags

This thread keeps track of set of event identifiers. The event identifiers are purged after a certain interval (ID_LIFECYCLE) has elapsed. The oldest set of entries are also purged if the number of entries in the buffers has exceeded the maximum specified limit (MAX_LENGTH_OF_ID_BUFFER).


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Fields inherited from interface cgl.narada.protocol.ProtocolDebugFlags
BrokerLocatorCommunicator_Debug, ClientConnectionHandler_Debug, Connection_Debug, ConnectionPropagation_Debug, Destinations_Debug, DuplicateDetection_Debug, EventBuffer_Debug, EventRoutingProtocol_Debug, Gateway_Debug, GatewayInfo_Debug, GatewayPropagation_Debug, JmsProfilePropagation_Debug, LinkCostMatrix_Debug, NodeAdditionProtocol_Debug, NodeAddress_Debug, Path_Debug, PersistentEventRouting_Debug, ProfilePropagationProtocol_Debug, ProtocolException_Debug, ProtocolHandler_Debug, ProtocolID_Debug, ProtocolIDFactory_Debug, RoutingCache_Debug, RtpEventRoutingProtocol_Debug, RtpProfilePropagation_Debug, SecureMessageRouting_Debug, TagValueEventRoutingProtocol_Debug, TagValueProfilePropagation_Debug, XmlEventRoutingProtocol_Debug, XPathProfilePropagation_Debug
 
Method Summary
static DuplicateDetection getInstance()
           
 boolean isDuplicate(NBEvent nbEvent)
          Check to see if an EventID is duplicate one.
static void main(String[] args)
           
 void registerEvent(NBEvent nbEvent)
          Once an event has been deemed to be not a duplicate, such an event needs to be registered with the duplicate detector so that future duplicates can be detected.
 void restartServices()
          Restart the thread's services.
 void run()
           
 void shutdownServices()
          Shutdown the thread's services
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static DuplicateDetection getInstance()

shutdownServices

public void shutdownServices()
Shutdown the thread's services


restartServices

public void restartServices()
Restart the thread's services.


isDuplicate

public boolean isDuplicate(NBEvent nbEvent)
Check to see if an EventID is duplicate one.

Parameters:
nbEvent -
Returns:
true if this is a duplicate event, false otherwise.

registerEvent

public void registerEvent(NBEvent nbEvent)
Once an event has been deemed to be not a duplicate, such an event needs to be registered with the duplicate detector so that future duplicates can be detected.

Parameters:
nbEvent -

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

main

public static void main(String[] args)
Parameters:
args -


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