com.caucho.message.journal
Class JournalWriteActor

java.lang.Object
  extended by com.caucho.env.actor.AbstractActorProcessor<JournalRingItem>
      extended by com.caucho.message.journal.JournalWriteActor
All Implemented Interfaces:
ActorProcessor<JournalRingItem>

public class JournalWriteActor
extends AbstractActorProcessor<JournalRingItem>

Actor-processor for writing to the transaction log. The actor is a single-threaded process.


Constructor Summary
JournalWriteActor(JournalFile journalFile)
           
 
Method Summary
 java.lang.String getThreadName()
          Returns the current thread name.
 void onProcessComplete()
          Called when all items in the queue are processed.
 void process(JournalRingItem entry)
          Process a single item.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.env.actor.AbstractActorProcessor
onProcessStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JournalWriteActor

public JournalWriteActor(JournalFile journalFile)
Method Detail

getThreadName

public java.lang.String getThreadName()
Description copied from class: AbstractActorProcessor
Returns the current thread name.

Specified by:
getThreadName in interface ActorProcessor<JournalRingItem>
Overrides:
getThreadName in class AbstractActorProcessor<JournalRingItem>

process

public final void process(JournalRingItem entry)
                   throws java.io.IOException
Description copied from class: AbstractActorProcessor
Process a single item.

Specified by:
process in interface ActorProcessor<JournalRingItem>
Specified by:
process in class AbstractActorProcessor<JournalRingItem>
Throws:
java.io.IOException

onProcessComplete

public void onProcessComplete()
                       throws java.lang.Exception
Description copied from class: AbstractActorProcessor
Called when all items in the queue are processed. This can be used to flush buffers.

Specified by:
onProcessComplete in interface ActorProcessor<JournalRingItem>
Overrides:
onProcessComplete in class AbstractActorProcessor<JournalRingItem>
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object