Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.io.journal
Interface Journal

All Superinterfaces:
com.oracle.common.base.Disposable
All Known Implementing Classes:
AbstractJournalRM.JournalImpl, BackupJournalRM.JournalImpl, RamJournalRM.JournalImpl

public interface Journal
extends com.oracle.common.base.Disposable

The Journal interface represents data that is written as part of a stream of updates, with the ability to identify writes (and later read them) using a ticket system. The Journal does not support erasure, but does allow the Journal to discard data that has been written previously as long as it has been "released" via this interface.

Since:
Coherence 3.7
Author:
cp 2010-06-10

Nested Class Summary
static interface Journal.JournalConsumer
          An interface that represents the actions that a Journal may request of an object that uses the Journal.

 

Method Summary
 Binary read(long lTicket)
          Using a ticket returned from a previous call to 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.
 long write(Binary bin)
          Write a Binary value to the Journal and return a ticket for it.

 

Methods inherited from interface com.oracle.common.base.Disposable
dispose

 

Method Detail

write

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

read

Binary read(long lTicket)
Using a ticket returned from a previous call to write(com.tangosol.util.Binary), read the Binary value that was written to the Journal.
Parameters:
lTicket - a ticket returned from a previous call to write(com.tangosol.util.Binary)
Returns:
the Binary value that was previously written
Throws:
java.lang.IllegalStateException - may be thrown if the passed ticket had already been released

release

int release(long lTicket)
Notify the Journal that the value corresponding to the specified ticket is no longer needed.
Parameters:
lTicket - a ticket returned from a previous call to write(com.tangosol.util.Binary)
Returns:
the number of bytes released
Throws:
java.lang.IllegalStateException - may be thrown if the passed ticket had already been released

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


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