fabric.store
Class SubscriptionManager

java.lang.Object
  extended by java.lang.Thread
      extended by fabric.common.FabricThread.AbstractImpl
          extended by fabric.store.SubscriptionManager
All Implemented Interfaces:
FabricThread, java.lang.Runnable

public class SubscriptionManager
extends FabricThread.AbstractImpl

Keeps track of who's subscribed to what object. Handles subscriptions for a single store.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Nested classes/interfaces inherited from interface fabric.common.FabricThread
FabricThread.AbstractImpl
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SubscriptionManager(java.lang.String store, TransactionManager tm)
           
 
Method Summary
 void notifyUpdate(long onum, RemoteWorker worker)
          Notifies the subscription manager that an object has been updated by a particular worker.
 void run()
           
 void subscribe(long onum, RemoteWorker worker, boolean dissemSubscribe)
          Subscribes the given worker to the given onum.
 
Methods inherited from class fabric.common.FabricThread.AbstractImpl
getTransactionManager, setTransactionManager
 
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
 

Constructor Detail

SubscriptionManager

public SubscriptionManager(java.lang.String store,
                           TransactionManager tm)
Parameters:
tm - The transaction manager corresponding to the store for which subscriptions are to be managed.
Method Detail

run

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

subscribe

public void subscribe(long onum,
                      RemoteWorker worker,
                      boolean dissemSubscribe)
Subscribes the given worker to the given onum.

Parameters:
dissemSubscribe - If true, then the given subscriber will be subscribed as a dissemination node; otherwise it will be subscribed as a worker.

notifyUpdate

public void notifyUpdate(long onum,
                         RemoteWorker worker)
Notifies the subscription manager that an object has been updated by a particular worker.