Package com.tangosol.io.journal
Class RamJournalRM.FlashConsumer
- java.lang.Object
-
- com.tangosol.io.journal.RamJournalRM.FlashConsumer
-
- All Implemented Interfaces:
Disposable
,Journal.JournalConsumer
,AutoCloseable
- Enclosing class:
- RamJournalRM
protected class RamJournalRM.FlashConsumer extends Object implements Journal.JournalConsumer
The FlashConsumer is a conduit between this RamJournalRM and the FlashJournalRM, allowing this journal to read/write to/from the other flash journal, and for the flash journal to notify this journal of lifecycle and other events.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FlashConsumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dedupe(byte[][] aab)
This method may be invoked by the Journal implementation to request that any immutable byte arrays managed by the consumer be de-duplicated.void
dispose()
Invoked when all resources owned by the implementer can safely be released.void
evacuate(long lTicketMask, long lTicketValue)
This method may be invoked by the Journal implementation to request that the consumer evacuate a particular journal file.String
getDescription()
Format a String description of the Consumer.Journal
getJournal()
Obtain the flash Journal instance.void
notifyRamJournalDisposed()
Notifies the JournalConsumer that the RamJournalRM that uses it has been disposed.void
setJournal(Journal jrnl)
Provide the FlashConsumer with a Journal instance that provides flash storage.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.oracle.coherence.common.base.Disposable
close
-
-
-
-
Method Detail
-
evacuate
public void evacuate(long lTicketMask, long lTicketValue)
This method may be invoked by the Journal implementation to request that the consumer evacuate a particular journal file.- Specified by:
evacuate
in interfaceJournal.JournalConsumer
- Parameters:
lTicketMask
- indicates which bits of the tickets to checklTicketValue
- indicates what bit pattern needs to be matched on the tickets in order to select them for evacuation
-
dedupe
public void dedupe(byte[][] aab)
This method may be invoked by the Journal implementation to request that any immutable byte arrays managed by the consumer be de-duplicated.- Specified by:
dedupe
in interfaceJournal.JournalConsumer
- Parameters:
aab
- an array of byte[] objects for intern-ing byte[] references
-
getDescription
public String getDescription()
Format a String description of the Consumer.- Specified by:
getDescription
in interfaceJournal.JournalConsumer
- Returns:
- a comma-delimited key-value description of this object
-
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
-
getJournal
public Journal getJournal()
Obtain the flash Journal instance.- Returns:
- the Journal that provides flash storage to the RamJournalRM
-
setJournal
public void setJournal(Journal jrnl)
Provide the FlashConsumer with a Journal instance that provides flash storage.- Parameters:
jrnl
- a Journal from a FlashJournalRM
-
notifyRamJournalDisposed
public void notifyRamJournalDisposed()
Notifies the JournalConsumer that the RamJournalRM that uses it has been disposed.
-
-