Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.io.journal
Class FlashJournalRM.PreparerDaemon

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.Daemon
          extended by com.tangosol.io.journal.FlashJournalRM.PreparerDaemon

All Implemented Interfaces:
Guardable, java.lang.Runnable
Enclosing class:
FlashJournalRM

protected class FlashJournalRM.PreparerDaemon
extends Daemon

The PreparerDaemon takes the enqueued Binary values for the JournalFile objects, and lays them out in Buffer objects from the BufferPool, enqueuing them for the WriterDaemon to write.


Nested Class Summary

 

Nested classes/interfaces inherited from class com.tangosol.util.Daemon
Daemon.DaemonWorker

 

Constructor Summary
FlashJournalRM.PreparerDaemon()
          Construct a PreparerDaemon.

 

Method Summary
protected  void changeState(int nState, Daemon.DaemonWorker worker)
          Change the state of the daemon.
protected  Daemon.DaemonWorker instantiateWorker()
          Instantiate a DaemonWorker that will be used as a daemon.
 void notifyItemQueued(FlashJournalRM.JournalFile jrnlfile, long lTicket)
          Notify the PreparerDaemon that an item has been queued to be written to the specified JournalFile.
 void notifyJournalFileFull(FlashJournalRM.JournalFile jrnlfile)
          Notify the PreparerDaemon that the specified JournalFile has been cut off for new additions.
 void run()
          The daemon's implementation method.
 void stop()
          Request the daemon to stop.

 

Methods inherited from class com.tangosol.util.Daemon
configureWorker, ensureThreadGroup, finishStarting, finishStopping, getConfiguredName, getConfiguredPriority, getContext, getDescription, getGuardRegisterAction, getMaxWaitMillis, getState, getThread, getThreadContextClassLoader, getWorker, guardIfNeeded, heartbeat, heartbeat, isGuarded, isOnWorkerThread, isRunning, isStopping, recover, setConfiguredName, setConfiguredPriority, setContext, setGuardPolicy, setGuardRegisterAction, setThreadContextClassLoader, shutdown, start, terminate, toStateString, toString

 

Constructor Detail

FlashJournalRM.PreparerDaemon

public FlashJournalRM.PreparerDaemon()
Construct a PreparerDaemon.

Method Detail

instantiateWorker

protected Daemon.DaemonWorker instantiateWorker()
Instantiate a DaemonWorker that will be used as a daemon.
Overrides:
instantiateWorker in class Daemon
Returns:
a new instance of DaemonWorker or a sub-class thereof

run

public void run()
The daemon's implementation method. Override this method to implement a daemon.

An example implementation is:

   while (!isStopping())
       {
       // do some processing
       // ...

       synchronized (this)
           {
           // wait for notification of more work
           wait();
           }
       }
 
Specified by:
run in interface java.lang.Runnable
Specified by:
run in class Daemon

changeState

protected void changeState(int nState,
                           Daemon.DaemonWorker worker)
Change the state of the daemon.
Overrides:
changeState in class Daemon
Parameters:
nState - one of the STATE_enums
worker - the new worker, if starting, otherwise the current worker

stop

public void stop()
Request the daemon to stop. This method will only have an effect if the daemon sub-class respects the value returned from Daemon.isStopping().
Overrides:
stop in class Daemon

notifyItemQueued

public void notifyItemQueued(FlashJournalRM.JournalFile jrnlfile,
                             long lTicket)
Notify the PreparerDaemon that an item has been queued to be written to the specified JournalFile.
Parameters:
jrnlfile - the JournalFile that is being appended to
lTicket - the ticket for the item that was queued

notifyJournalFileFull

public void notifyJournalFileFull(FlashJournalRM.JournalFile jrnlfile)
Notify the PreparerDaemon that the specified JournalFile has been cut off for new additions.
Parameters:
jrnlfile - the JournalFile that is now full

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.