Package com.tangosol.io.journal
Class BackupJournalRM.RamConsumer
java.lang.Object
com.tangosol.io.journal.BackupJournalRM.RamConsumer
- All Implemented Interfaces:
Disposable,Journal.JournalConsumer,AutoCloseable
- Enclosing class:
BackupJournalRM
The RamConsumer is a pass-through consumer used to obtain a ram journal
instance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddedupe(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.voiddispose()Invoked when all resources owned by the implementer can safely be released.voidevacuate(long lTicketMask, long lTicketValue) This method may be invoked by the Journal implementation to request that the consumer evacuate a particular journal file.Obtain the instance of the backup journal.Obtain the underlying consumer that this RamConsumer delegates to.Format a String description of the Consumer.voidsetBackupJournal(BackupJournalRM.JournalImpl jrnlBackup) Specify the instance of the backup journal.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.oracle.coherence.common.base.Disposable
close
-
Constructor Details
-
RamConsumer
protected RamConsumer()
-
-
Method Details
-
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:
evacuatein 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:
dedupein interfaceJournal.JournalConsumer- Parameters:
aab- an array of byte[] objects for intern-ing byte[] references
-
getDescription
Format a String description of the Consumer.- Specified by:
getDescriptionin 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:
disposein interfaceDisposable
-
getBackupJournal
Obtain the instance of the backup journal.- Returns:
- the instance of the backup JournalImpl that this delegating RamConsumer is serving
-
setBackupJournal
Specify the instance of the backup journal.- Parameters:
jrnlBackup- the instance of the backup JournalImpl that this delegating RamConsumer is serving
-
getConsumer
Obtain the underlying consumer that this RamConsumer delegates to. The consumer is null before the backup journal is configured and after the backup journal or RamConsumer has been disposed.- Returns:
- the underlying consumer or null
-