|
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.io.journal.FlashJournalRM.WriterDaemon.PendingWriteTask
protected class FlashJournalRM.WriterDaemon.PendingWriteTask
A task that gets queued to perform an asynchronous appending write on the WriterDaemon thread.
Constructor Summary | |
---|---|
FlashJournalRM.WriterDaemon.PendingWriteTask(FlashJournalRM.JournalFile jrnlfile, FlashJournalRM.Buffer buf, int cbBuffer) Construct a PendingWriteInfo "struct". |
Method Summary | |
---|---|
protected void |
processWriteException(java.io.IOException ioe, java.util.List listBuffer, java.nio.ByteBuffer[] aniobuf, FlashJournalRM.JournalFile jrnlfile) Process IOException while flushing the buffers to disk. |
void |
run() Execute the task, writing the buffer to the end of the file. |
protected void |
writeRemainder(java.io.IOException e, java.util.List listBuffer, java.nio.ByteBuffer[] aniobuf, boolean fSingleBlockWrite) Write what has not been written (remainder) to disk. |
protected boolean |
writeToFile(FlashJournalRM.JournalFile jrnlfile, java.nio.ByteBuffer[] aniobuf, java.util.List listBuffer, int cb) Write the provided buffers to the FlashJournalRM.JournalFile . |
Constructor Detail |
---|
public FlashJournalRM.WriterDaemon.PendingWriteTask(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 bufferMethod Detail |
---|
public void run()
run
in interface java.lang.Runnable
protected boolean writeToFile(FlashJournalRM.JournalFile jrnlfile, java.nio.ByteBuffer[] aniobuf, java.util.List listBuffer, int cb)
FlashJournalRM.JournalFile
. This method will reattempt writes if writes fully or partially fail via processWriteException(java.io.IOException, java.util.List, java.nio.ByteBuffer[], com.tangosol.io.journal.FlashJournalRM.JournalFile)
.jrnlfile
- the JournalFile the buffers should be written toaniobuf
- the NIO byte buffers to persistlistBuffer
- the buffers maintained by the buffer poolcb
- the number of bytes to writeprotected void processWriteException(java.io.IOException ioe, java.util.List listBuffer, java.nio.ByteBuffer[] aniobuf, FlashJournalRM.JournalFile jrnlfile)
Upon encountering a write exception the write is reattempted with an increasing interval between attempts. This method switches the FlashJournalRM.CongestionPolicy
allowing exceptions to be thrown to the client as the Journal naturally enters congestion.
Control may be returned to the caller with the Journal being unable to be repaired; this is highlighted by the throwing of a RuntimeException or the current thread's interrupt bit being set. In the latter case the Journal may wish to operate in a read-only mode.
ioe
- the IOExceptionlistBuffer
- the list of buffers to be flushed to diskaniobuf
- the array of byte buffers to be flushed to diskjrnlfile
- the FlashJournalRM.JournalFile
being written fromjava.lang.IllegalStateException
- if the write could not be completed / repairedprotected void writeRemainder(java.io.IOException e, java.util.List listBuffer, java.nio.ByteBuffer[] aniobuf, boolean fSingleBlockWrite) throws java.io.IOException
e
- the IOExceptionlistBuffer
- the list of buffers to be flushed to diskaniobuf
- the array of byte buffers to be flushed to diskfSingleBlockWrite
- whether to switch the preference in favor of single block writesjava.io.IOException
|
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 |