|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.2) E26043-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.io.journal.AbstractJournalRM.JournalFile
protected abstract class AbstractJournalRM.JournalFile
A JournalFile object is created for each file used to store the journal contents. It is created in an initial "append" mode -- which may be interrupted from time to time by a "congested" mode if writes are falling too far behind, it then transitions to a "full" mode, and once enough of its storage has been released it transitions to an "evacuating" mode, which (once evacuated) becomes "garbage" and (upon deletion) is "discarded".
| Field Summary | |
|---|---|
protected java.util.concurrent.atomic.AtomicLong |
m_cbReleasedAmount of data that has been released. |
protected java.util.concurrent.atomic.AtomicLong |
m_cbWrittenAmount of data that has been written. |
protected boolean |
m_fNotifiedFullSet to true when the JournalFile is notified that it is full and its contents have been fully written. |
protected AbstractJournalRM.JournalFile |
m_jrnlfileNextThe JournalFile that "comes after" this JournalFile in the journal. |
protected java.util.concurrent.atomic.AtomicLong |
m_lStateOffsetCurrent state of the JournalFile and the appending offset within the file. |
protected int |
m_nFileThe file index. |
static long |
STATE_APPENDINGState: File is being appended to. |
static long |
STATE_CONGESTIONState: File is appending, but there is congestion forcing a wait by all appending threads. |
static long |
STATE_DISCARDEDState: File has been discarded. |
static long |
STATE_EVACUATINGState: Remaining entries in the file are being evacuated. |
static long |
STATE_FULLState: File is full and appends are no longer occurring. |
static long |
STATE_GARBAGEState: File is garbage and can safely be discarded. |
static long |
STATE_MASKThe bits of the m_lStateOffset that are used for the current state of the file (one of the STATE_* constants). |
| Constructor Summary | |
|---|---|
AbstractJournalRM.JournalFile(int nFile)Construct a Journal File. |
|
| Method Summary | |
|---|---|
abstract void |
dispose() |
abstract long |
enqueue(Binary bin)Enqueue a Binary value to be written to this file, returning a ticket, or return 0L if this file is full and the append has to occur to a new file. |
void |
evacuate()Called by the CollectorDaemon to evacuate all remaining data from the JournalFile. |
long |
getBytesWritten()Determine the number of bytes written. |
protected java.lang.String |
getDescription()Format the object attributes into a String for inclusion in the String returned from the toString() method. |
int |
getFileId()Determine the file id (0-511) for this JournalFile. |
AbstractJournalRM.JournalFile |
getNextJournalFile()Determine the JournalFile for the file in the journal that follows the file represented by this JournalFile. |
long |
getOffset()Determine the current append offset (or length) of this JournalFile. |
long |
getReleased()Determine the number of bytes that have been released from this JournalFile. |
long |
getState()Determine the current state of this JournalFile. |
boolean |
isAppending()Determine the current state of this JournalFile. |
void |
notifyWriteCompleted()Called by the CollectorDaemon the first time that the JournalFile is encountered in its FULL state and its data has all been written. |
abstract Binary |
read(long lTicket)Read the Binary associated with the specified ticket from the journal file. |
void |
release(int cbValue)Release the specified number of bytes from this journal file. |
void |
setNextJournalFile(AbstractJournalRM.JournalFile jrnlfileNext)Once this file has been filled, it gets a reference to the file that follows it. |
protected void |
setState(long lState)Specify the current state of this JournalFile. |
java.lang.String |
toString() |
void |
touch()This method is called periodically by the collector daemon to indicate that the file is still being used. |
| Field Detail |
|---|
public static final long STATE_APPENDING
public static final long STATE_CONGESTION
public static final long STATE_FULL
public static final long STATE_EVACUATING
public static final long STATE_GARBAGE
public static final long STATE_DISCARDED
public static final long STATE_MASK
m_lStateOffset that are used for the current state of the file (one of the STATE_* constants).
protected final int m_nFile
protected final java.util.concurrent.atomic.AtomicLong m_lStateOffset
protected final java.util.concurrent.atomic.AtomicLong m_cbWritten
protected final java.util.concurrent.atomic.AtomicLong m_cbReleased
protected volatile AbstractJournalRM.JournalFile m_jrnlfileNext
protected boolean m_fNotifiedFull
| Constructor Detail |
|---|
public AbstractJournalRM.JournalFile(int nFile)
nFile - the file number in the range 0-511 (inclusive)| Method Detail |
|---|
public abstract long enqueue(Binary bin)
bin - the value to append to the journal filepublic abstract Binary read(long lTicket)
lTicket - a ticket previously returned from enqueue(com.tangosol.util.Binary)public void release(int cbValue)
cbValue - the number of bytes that are being releasedpublic int getFileId()
public long getState()
protected void setState(long lState)
lState - the one of the STATE_* constantspublic long getOffset()
public long getBytesWritten()
public long getReleased()
public boolean isAppending()
public void touch()
public AbstractJournalRM.JournalFile getNextJournalFile()
public void setNextJournalFile(AbstractJournalRM.JournalFile jrnlfileNext)
jrnlfileNext - the next file in the journalprotected java.lang.String getDescription()
toString() method.public void notifyWriteCompleted()
public void evacuate()
public abstract void dispose()
dispose in interface com.oracle.common.base.Disposablepublic java.lang.String toString()
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.2) E26043-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||