Class BackupJournalRM.JournalImpl
java.lang.Object
com.tangosol.io.journal.BackupJournalRM.JournalImpl
- All Implemented Interfaces:
Disposable,Journal,AutoCloseable
- Enclosing class:
BackupJournalRM
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tangosol.io.journal.Journal
Journal.JournalConsumer -
Constructor Summary
ConstructorsConstructorDescriptionJournalImpl(Journal jrnlRam, Journal jrnlFlash) Construct a Journal that writes to the RAM journal until the configured load factor is exceeded, a which point it will write to the flash journal instead. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Invoked when all resources owned by the implementer can safely be released.protected Journal.JournalConsumerObtain the JournalConsumer (typically a JournalBinaryStore) instance associated with this JournalImpl.read(long lTicket) Using a ticket returned from a previous call toJournal.write(com.tangosol.util.Binary), read the Binary value that was written to the Journal.intrelease(long lTicket) Notify the Journal that the value corresponding to the specified ticket is no longer needed.protected voidsetConsumer(Journal.JournalConsumer consumer) Specify the JournalConsumer (typically a JournalBinaryStore) instance that this JournalImpl was created for.toString()longWrite a Binary value to the Journal and return a ticket for it.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.coherence.common.base.Disposable
close
-
Constructor Details
-
JournalImpl
-
-
Method Details
-
write
-
read
Using a ticket returned from a previous call toJournal.write(com.tangosol.util.Binary), read the Binary value that was written to the Journal.- Specified by:
readin interfaceJournal- Parameters:
lTicket- a ticket returned from a previous call toJournal.write(com.tangosol.util.Binary)- Returns:
- the Binary value that was previously written
-
release
public int release(long lTicket) Notify the Journal that the value corresponding to the specified ticket is no longer needed.- Specified by:
releasein interfaceJournal- Parameters:
lTicket- a ticket returned from a previous call toJournal.write(com.tangosol.util.Binary)- Returns:
- the number of bytes released
-
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
-
getConsumer
Obtain the JournalConsumer (typically a JournalBinaryStore) instance associated with this JournalImpl.- Returns:
- the JournalConsumer that this JournalImpl was created for
-
setConsumer
Specify the JournalConsumer (typically a JournalBinaryStore) instance that this JournalImpl was created for.- Parameters:
consumer- a JournalConsumer
-
toString
-