protected class AbstractJournalRM.CollectorDaemon extends Daemon
This daemon is not intended to be guarded.
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractJournalRM.CollectorDaemon.CollectionCoordinator
A CollectionCoordinator is responsible for shaping an evacuation as well as managing any reserved files created to ensure the journal continues to operate.
|
protected class |
AbstractJournalRM.CollectorDaemon.InvokeGCJournalFile
A
AbstractJournalRM.JournalFile implementation returned when the journal has consumed all known capacity. |
Daemon.DaemonWorkerBase.LoggingWriter, Base.StackFrame| Constructor and Description |
|---|
CollectorDaemon()
Construct a CollectorDaemon.
|
| Modifier and Type | Method and Description |
|---|---|
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 AbstractJournalRM.CollectorDaemon.CollectionCoordinator |
getCoordinator()
|
protected String |
getDescription()
Format the Daemon attributes into a String for inclusion in the String returned from the
Daemon.toString() method. |
protected int |
getReservedFileId()
Return the currently reserved file id.
|
protected Daemon.DaemonWorker |
instantiateWorker()
Instantiate a DaemonWorker that will be used as a daemon.
|
void |
notifyReleased(int cbReleased, int nFileId)
Notifies the collector that a
AbstractJournalRM.JournalFile has had some memory released. |
void |
run()
The daemon's implementation method.
|
protected void |
setGuardPolicy(Guardian guardian, long cTimeoutMillis, float flPctRecover)
Set the Guardian and policy to guard this Daemon with.
|
protected Iterator<AbstractJournalRM.JournalFile> |
sortedIterator()
Returns a sorted
Iterator based on the amount of released memory in each AbstractJournalRM.JournalFile. |
void |
stop()
Request the daemon to stop.
|
changeState, configureWorker, ensureThreadGroup, finishStarting, finishStopping, getConfiguredName, getConfiguredPriority, getContext, getGuardRegisterAction, getMaxWaitMillis, getState, getThread, getThreadContextClassLoader, getWorker, guardIfNeeded, heartbeat, heartbeat, isGuarded, isOnWorkerThread, isRunning, isStopping, recover, setConfiguredName, setConfiguredPriority, setContext, setGuardRegisterAction, setThreadContextClassLoader, shutdown, start, terminate, toStateString, toStringazzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, waitprotected Daemon.DaemonWorker instantiateWorker()
instantiateWorker in class Daemonpublic void stop()
Daemon.isStopping().public void run()
An example implementation is:
while (!isStopping())
{
// do some processing
// ...
synchronized (this)
{
// wait for notification of more work
wait();
}
}
protected void setGuardPolicy(Guardian guardian, long cTimeoutMillis, float flPctRecover)
setGuardPolicy in class Daemonguardian - the Guardian that will be guarding this DaemoncTimeoutMillis - the timeout in ms for this Daemon, or 0 for the service guardian timeoutflPctRecover - the recovery percentage for this Daemonprotected Iterator<AbstractJournalRM.JournalFile> sortedIterator()
Iterator based on the amount of released memory in each AbstractJournalRM.JournalFile.protected String getDescription()
Daemon.toString() method.getDescription in class Daemonprotected void dedupe()
public void notifyReleased(int cbReleased,
int nFileId)
AbstractJournalRM.JournalFile has had some memory released.cbReleased - the number of bytes releasednFileId - the AbstractJournalRM.JournalFile's file idprotected int getReservedFileId()
protected AbstractJournalRM.CollectorDaemon.CollectionCoordinator getCoordinator()