fabric.worker.remote
Class MessageHandlerThread

java.lang.Object
  extended by java.lang.Thread
      extended by fabric.common.FabricThread.AbstractImpl
          extended by fabric.common.AbstractMessageHandlerThread<SessionAttributes,MessageHandlerThread>
              extended by fabric.worker.remote.MessageHandlerThread
All Implemented Interfaces:
FabricThread, MessageHandler, java.lang.Runnable

public class MessageHandlerThread
extends AbstractMessageHandlerThread<SessionAttributes,MessageHandlerThread>


Nested Class Summary
 
Nested classes/interfaces inherited from class fabric.common.AbstractMessageHandlerThread
AbstractMessageHandlerThread.Pool<MessageHandlerThread extends AbstractMessageHandlerThread<?,MessageHandlerThread>>, AbstractMessageHandlerThread.SessionAttributes
 
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 fabric.common.AbstractMessageHandlerThread
pool, session
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MessageHandlerThread(RemoteCallManager rcm, AbstractMessageHandlerThread.Pool<MessageHandlerThread> pool)
          Instantiates a new message-handler thread and starts it running.
 
Method Summary
 void handle(AbortTransactionMessage abortTransactionMessage)
          In each message handler, we maintain the invariant that upon exit, the worker's TransactionManager is associated with a null log.
 CommitTransactionMessage.Response handle(CommitTransactionMessage commitTransactionMessage)
          In each message handler, we maintain the invariant that upon exit, the worker's TransactionManager is associated with a null log.
 GetPrincipalMessage.Response handle(GetPrincipalMessage getPrincipalMessage)
           
 ObjectUpdateMessage.Response handle(ObjectUpdateMessage objectUpdateMessage)
           
 PrepareTransactionMessage.Response handle(PrepareTransactionMessage prepareTransactionMessage)
           
 ReadMessage.Response handle(ReadMessage readMessage)
           
 RemoteCallMessage.Response handle(RemoteCallMessage remoteCallMessage)
           
 StalenessCheckMessage.Response handle(StalenessCheckMessage stalenessCheckMessage)
           
 TakeOwnershipMessage.Response handle(TakeOwnershipMessage takeOwnershipMessage)
           
protected  boolean shuttingDown()
          Determines whether the thread should shut down.
 
Methods inherited from class fabric.common.AbstractMessageHandlerThread
associateSession, getSession, recycle, run, sink, source
 
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

MessageHandlerThread

public MessageHandlerThread(RemoteCallManager rcm,
                            AbstractMessageHandlerThread.Pool<MessageHandlerThread> pool)
Instantiates a new message-handler thread and starts it running.

Method Detail

shuttingDown

protected boolean shuttingDown()
Description copied from class: AbstractMessageHandlerThread
Determines whether the thread should shut down.

Overrides:
shuttingDown in class AbstractMessageHandlerThread<SessionAttributes,MessageHandlerThread>

handle

public RemoteCallMessage.Response handle(RemoteCallMessage remoteCallMessage)
                                  throws RemoteCallException,
                                         ProtocolError
Throws:
RemoteCallException
ProtocolError

handle

public void handle(AbortTransactionMessage abortTransactionMessage)
            throws ProtocolError
In each message handler, we maintain the invariant that upon exit, the worker's TransactionManager is associated with a null log.

Throws:
ProtocolError

handle

public PrepareTransactionMessage.Response handle(PrepareTransactionMessage prepareTransactionMessage)
                                          throws ProtocolError,
                                                 TransactionPrepareFailedException
Throws:
ProtocolError
TransactionPrepareFailedException

handle

public CommitTransactionMessage.Response handle(CommitTransactionMessage commitTransactionMessage)
                                         throws ProtocolError
In each message handler, we maintain the invariant that upon exit, the worker's TransactionManager is associated with a null log.

Throws:
ProtocolError

handle

public ReadMessage.Response handle(ReadMessage readMessage)
                            throws ProtocolError
Throws:
ProtocolError

handle

public TakeOwnershipMessage.Response handle(TakeOwnershipMessage takeOwnershipMessage)
                                     throws ProtocolError
Throws:
ProtocolError

handle

public GetPrincipalMessage.Response handle(GetPrincipalMessage getPrincipalMessage)

handle

public ObjectUpdateMessage.Response handle(ObjectUpdateMessage objectUpdateMessage)

handle

public StalenessCheckMessage.Response handle(StalenessCheckMessage stalenessCheckMessage)
                                      throws ProtocolError
Throws:
ProtocolError