Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.io.journal
Class BackupJournalRM.JournalImpl

java.lang.Object
  extended by com.tangosol.io.journal.BackupJournalRM.JournalImpl

All Implemented Interfaces:
com.oracle.common.base.Disposable, Journal
Enclosing class:
BackupJournalRM

protected class BackupJournalRM.JournalImpl
extends java.lang.Object
implements Journal

A Journal implementation managed by this Journal Resource Manager.


Nested Class Summary

 

Nested classes/interfaces inherited from interface com.tangosol.io.journal.Journal
Journal.JournalConsumer

 

Constructor Summary
BackupJournalRM.JournalImpl(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
 void dispose()
          
protected  Journal.JournalConsumer getConsumer()
          Obtain the JournalConsumer (typically a JournalBinaryStore) instance associated with this JournalImpl.
 Binary read(long lTicket)
          Using a ticket returned from a previous call to Journal.write(com.tangosol.util.Binary), read the Binary value that was written to the Journal.
 int release(long lTicket)
          Notify the Journal that the value corresponding to the specified ticket is no longer needed.
protected  void setConsumer(Journal.JournalConsumer consumer)
          Specify the JournalConsumer (typically a JournalBinaryStore) instance that this JournalImpl was created for.
 java.lang.String toString()
          
 long write(Binary bin)
          Write a Binary value to the Journal and return a ticket for it.

 

Constructor Detail

BackupJournalRM.JournalImpl

public BackupJournalRM.JournalImpl(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.
Parameters:
jrnlRam - the RAM journal to use
jrnlFlash - the flash journal to use

Method Detail

write

public long write(Binary bin)
Write a Binary value to the Journal and return a ticket for it.
Specified by:
write in interface Journal
Parameters:
bin - the Binary to write to the Journal
Returns:
the ticket that can later be used to access the Binary

read

public Binary read(long lTicket)
Using a ticket returned from a previous call to Journal.write(com.tangosol.util.Binary), read the Binary value that was written to the Journal.
Specified by:
read in interface Journal
Parameters:
lTicket - a ticket returned from a previous call to Journal.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:
release in interface Journal
Parameters:
lTicket - a ticket returned from a previous call to Journal.write(com.tangosol.util.Binary)
Returns:
the number of bytes released

dispose

public void dispose()
Specified by:
dispose in interface com.oracle.common.base.Disposable

getConsumer

protected Journal.JournalConsumer getConsumer()
Obtain the JournalConsumer (typically a JournalBinaryStore) instance associated with this JournalImpl.
Returns:
the JournalConsumer that this JournalImpl was created for

setConsumer

protected void setConsumer(Journal.JournalConsumer consumer)
Specify the JournalConsumer (typically a JournalBinaryStore) instance that this JournalImpl was created for.
Parameters:
consumer - a JournalConsumer

toString

public java.lang.String toString()

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.