|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.Daemon
com.tangosol.io.journal.FlashJournalRM.WriterDaemon
protected class FlashJournalRM.WriterDaemon
The WriterDaemon takes the enqueued Buffer objects from the PreparerDaemon, and appends them to a JournalFile.
Nested Class Summary | |
---|---|
protected class |
FlashJournalRM.WriterDaemon.FileFullTask A task that gets queued to perform cleanup on a file (on the WriterDaemon thread) when the file is full (no more writes will occur to the file). |
protected class |
FlashJournalRM.WriterDaemon.PendingWriteTask A task that gets queued to perform an asynchronous appending write on the WriterDaemon thread. |
Nested classes/interfaces inherited from class com.tangosol.util.Daemon |
---|
Daemon.DaemonWorker |
Field Summary | |
---|---|
protected long |
m_cMillisMultiBlockWrites The number of milliseconds total spent writing blocks in groups. |
protected long |
m_cMillisSingleBlockWrites The number of milliseconds total spent writing blocks individually. |
protected long |
m_cMultiBlockWrites The number of blocks written in groups (as part of a multi-buffer write). |
protected long |
m_cSingleBlockWrites The number of blocks written individually. |
protected boolean |
m_fPreferSingleBlockWrites Set to true if it becomes apparent that single block writes are preferable. |
protected java.util.concurrent.BlockingQueue |
m_queue A Queue of items for this daemon to execute. |
Constructor Summary | |
---|---|
FlashJournalRM.WriterDaemon() Construct a WriterDaemon. |
Method Summary | |
---|---|
void |
enqueueBuffer(FlashJournalRM.JournalFile jrnlfile, FlashJournalRM.Buffer buf, int cbBuffer) Notify the writer thread that a buffer needs to be written. |
int |
getAvgBlockWriteMillis() Determine the average number of milliseconds to write each block. |
int |
getAvgMultiBlockWriteMillis() Determine the average number of milliseconds to write each block using the NIO "scatter/gather" functionality. |
int |
getAvgSingleBlockWriteMillis() Determine the average number of milliseconds to write each block using the NIO "single buffer write" functionality. |
long |
getBlockWriteCount() Determine the total number of blocks written by this daemon. |
protected java.lang.String |
getDescription() Format the Daemon attributes into a String for inclusion in the String returned from the Daemon.toString() method. |
long |
getMultiBlockWriteCount() Determine the number of blocks written by this daemon using the NIO "scatter/gather" functionality. |
long |
getSingleBlockWriteCount() Determine the number of blocks written by this daemon using the NIO "single buffer write" functionality. |
boolean |
isSingleBlockWritePreferred() Determine if the next write should automatically use the "single buffer write" capability of NIO, instead of attempting to use the NIO scatter/gather capability. |
void |
notifyFileFull(FlashJournalRM.JournalFile jrnlfile) Notify the writer thread that a file is done being written to. |
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. |
void |
stop() Request the daemon to stop. |
Field Detail |
---|
protected java.util.concurrent.BlockingQueue m_queue
protected long m_cSingleBlockWrites
protected long m_cMillisSingleBlockWrites
protected long m_cMultiBlockWrites
protected long m_cMillisMultiBlockWrites
protected boolean m_fPreferSingleBlockWrites
Constructor Detail |
---|
public FlashJournalRM.WriterDaemon()
Method Detail |
---|
public void stop()
Daemon.isStopping()
.stop
in class Daemon
public void run()
An example implementation is:
while (!isStopping())
{
// do some processing
// ...
synchronized (this)
{
// wait for notification of more work
wait();
}
}
run
in interface java.lang.Runnable
run
in class Daemon
protected void setGuardPolicy(Guardian guardian, long cTimeoutMillis, float flPctRecover)
setGuardPolicy
in class Daemon
guardian
- 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 java.lang.String getDescription()
Daemon.toString()
method.getDescription
in class Daemon
public boolean isSingleBlockWritePreferred()
public long getBlockWriteCount()
public long getSingleBlockWriteCount()
public long getMultiBlockWriteCount()
public int getAvgBlockWriteMillis()
public int getAvgSingleBlockWriteMillis()
public int getAvgMultiBlockWriteMillis()
public void enqueueBuffer(FlashJournalRM.JournalFile jrnlfile, FlashJournalRM.Buffer buf, int cbBuffer)
jrnlfile
- the file to append tobuf
- the buffer to appendcbBuffer
- the number of bytes to append from the bufferpublic void notifyFileFull(FlashJournalRM.JournalFile jrnlfile)
jrnlfile
- the file to append to
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |