fedora.server.journal
Class JournalConsumerThread

java.lang.Object
  extended by java.lang.Thread
      extended by fedora.server.journal.JournalConsumerThread
All Implemented Interfaces:
java.lang.Runnable

public class JournalConsumerThread
extends java.lang.Thread

Title: JournalConsumerThread.java

Description: Process the journal entries as a separate Thread, while the JournalConsumer is blocking all calls from outside.

Version:
$Id: JournalConsumerThread.java 5367 2006-12-08 08:51:00 +0000 (Fri, 08 Dec 2006) cwilper $
Author:
jblake@cs.cornell.edu

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
JournalConsumerThread(java.util.Map<java.lang.String,java.lang.String> parameters, java.lang.String role, ServerInterface server, JournalReader reader, JournalRecoveryLog recoveryLog)
          Store references to all of this stuff, but we can't start work without a ManagementDelegate is provided, and we won't get that until the post-initialization stage.
 
Method Summary
 void run()
          Wait until the server completes its initialization, then process journal entries until the reader says there are no more, or until a shutdown is requested.
 void setManagementDelegate(ManagementDelegate delegate)
          Now that we have a ManagementDelegate to perform the operations, we can start working.
 void shutdown()
          Set the flag saying that it's time to quit.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, 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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JournalConsumerThread

public JournalConsumerThread(java.util.Map<java.lang.String,java.lang.String> parameters,
                             java.lang.String role,
                             ServerInterface server,
                             JournalReader reader,
                             JournalRecoveryLog recoveryLog)
Store references to all of this stuff, but we can't start work without a ManagementDelegate is provided, and we won't get that until the post-initialization stage.

Method Detail

setManagementDelegate

public void setManagementDelegate(ManagementDelegate delegate)
Now that we have a ManagementDelegate to perform the operations, we can start working.


run

public void run()
Wait until the server completes its initialization, then process journal entries until the reader says there are no more, or until a shutdown is requested.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

shutdown

public void shutdown()
Set the flag saying that it's time to quit.