Package com.tangosol.io.journal
Class AbstractJournalRM.CollectorDaemon.InvokeGCJournalFile
- java.lang.Object
-
- com.tangosol.io.journal.AbstractJournalRM.JournalFile
-
- com.tangosol.io.journal.AbstractJournalRM.CollectorDaemon.InvokeGCJournalFile
-
- All Implemented Interfaces:
Disposable
,AutoCloseable
- Enclosing class:
- AbstractJournalRM.CollectorDaemon
protected class AbstractJournalRM.CollectorDaemon.InvokeGCJournalFile extends AbstractJournalRM.JournalFile
AAbstractJournalRM.JournalFile
implementation returned when the journal has consumed all known capacity. This implementation triggers anexhaustive evacuation
ensuring data structures are compact thus any released memory is reclaimed.
-
-
Field Summary
-
Fields inherited from class com.tangosol.io.journal.AbstractJournalRM.JournalFile
m_cbReleased, m_cbWritten, m_fNotifiedFull, m_jrnlfileNext, m_lStateOffset, m_nFile, STATE_APPENDING, STATE_CONGESTION, STATE_DISCARDED, STATE_EVACUATING, STATE_FULL, STATE_GARBAGE, STATE_MASK, STATE_RESERVED
-
-
Constructor Summary
Constructors Constructor Description InvokeGCJournalFile()
Construct a Journal File.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Invoked when all resources owned by the implementer can safely be released.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.Binary
read(long lTicket)
Read the Binary associated with the specified ticket from the journal file.-
Methods inherited from class com.tangosol.io.journal.AbstractJournalRM.JournalFile
compareAndSetOffset, compareAndSetState, evacuate, getBytesWritten, getDescription, getFileId, getNextJournalFile, getOffset, getOffset, getReleased, getState, getState, isAppending, isReserved, notifyWriteCompleted, release, setNextJournalFile, setReserved, setState, toString, touch
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.oracle.coherence.common.base.Disposable
close
-
-
-
-
Method Detail
-
enqueue
public 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.- Specified by:
enqueue
in classAbstractJournalRM.JournalFile
- Parameters:
bin
- the value to append to the journal file- Returns:
- a ticket if the Binary has successfully been enqueued, or 0L if the file is full
-
read
public Binary read(long lTicket)
Read the Binary associated with the specified ticket from the journal file.- Specified by:
read
in classAbstractJournalRM.JournalFile
- Parameters:
lTicket
- a ticket previously returned fromAbstractJournalRM.JournalFile.enqueue(com.tangosol.util.Binary)
- Returns:
- the Binary value that is associated with the ticket
-
dispose
public void dispose()
Invoked when all resources owned by the implementer can safely be released.Once disposed of the object should no longer be considered to be usable.
Note the Disposable interface is compatible with try-with-resources which will automatically invoke this method.
- Specified by:
dispose
in interfaceDisposable
- Specified by:
dispose
in classAbstractJournalRM.JournalFile
-
-