Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.io.journal
Class AbstractJournalRM.CollectorDaemon

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.Daemon
          extended by com.tangosol.io.journal.AbstractJournalRM.CollectorDaemon

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

protected class AbstractJournalRM.CollectorDaemon
extends Daemon

The CollectorDaemon evaluates the JournalFile objects to see which ones should be evacuated, it evacuates those that should be, and it deletes those that have been successfully evacuated.

This daemon is not intended to be guarded.


Nested Class Summary

 

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

 

Constructor Summary
AbstractJournalRM.CollectorDaemon()
          Construct a CollectorDaemon.

 

Method Summary
protected  void dedupe()
          Give the in-memory radix key stores a chance to de-dupe their byte[] values, similar to the concept behind String's intern() method.
protected  void evacuate(AbstractJournalRM.JournalFile jrnlfile)
          Evacuate all the remaining valid data from the specified JournalFile.
 int getAvgEvacuationMillis()
          Determine the average number of milliseconds to evacuate a file.
protected  java.lang.String getDescription()
          Format the Daemon attributes into a String for inclusion in the String returned from the Daemon.toString() method.
 int getMaxEvacuationMillis()
          Determine the maximum number of milliseconds to evacuate a file.
protected  Daemon.DaemonWorker instantiateWorker()
          Instantiate a DaemonWorker that will be used as a daemon.
 void run()
          The daemon's implementation method.
 void stop()
          Request the daemon to stop.

 

Methods inherited from class com.tangosol.util.Daemon
changeState, configureWorker, finishStarting, finishStopping, getConfiguredName, getConfiguredPriority, getContext, 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

AbstractJournalRM.CollectorDaemon

public AbstractJournalRM.CollectorDaemon()
Construct a CollectorDaemon.

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

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

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
See Also:
Thread.run()

getDescription

protected java.lang.String getDescription()
Format the Daemon attributes into a String for inclusion in the String returned from the Daemon.toString() method.
Overrides:
getDescription in class Daemon
Returns:
a String listing the attributes of the Daemon

dedupe

protected void dedupe()
Give the in-memory radix key stores a chance to de-dupe their byte[] values, similar to the concept behind String's intern() method.

evacuate

protected void evacuate(AbstractJournalRM.JournalFile jrnlfile)
Evacuate all the remaining valid data from the specified JournalFile.
Parameters:
jrnlfile - the file to evacuate

getAvgEvacuationMillis

public int getAvgEvacuationMillis()
Determine the average number of milliseconds to evacuate a file.
Returns:
the average number of milliseconds to perform evacuation

getMaxEvacuationMillis

public int getMaxEvacuationMillis()
Determine the maximum number of milliseconds to evacuate a file.
Returns:
the number of milliseconds of the longest evacuation

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


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