org.apache.activemq.kaha.impl.async
Class JournalFacade

java.lang.Object
  extended by org.apache.activemq.kaha.impl.async.JournalFacade
All Implemented Interfaces:
org.apache.activeio.journal.Journal

public final class JournalFacade
extends Object
implements org.apache.activeio.journal.Journal

Provides a Journal Facade to the DataManager.


Nested Class Summary
static class JournalFacade.RecordLocationFacade
           
 
Constructor Summary
JournalFacade(AsyncDataManager dataManager)
           
 
Method Summary
 void close()
           
 org.apache.activeio.journal.RecordLocation getMark()
           
 org.apache.activeio.journal.RecordLocation getNextRecordLocation(org.apache.activeio.journal.RecordLocation location)
           
 org.apache.activeio.packet.Packet read(org.apache.activeio.journal.RecordLocation location)
           
 void setJournalEventListener(org.apache.activeio.journal.JournalEventListener listener)
           
 void setMark(org.apache.activeio.journal.RecordLocation location, boolean sync)
           
 org.apache.activeio.journal.RecordLocation write(org.apache.activeio.packet.Packet packet, boolean sync)
           
 org.apache.activeio.journal.RecordLocation write(org.apache.activeio.packet.Packet packet, Runnable onComplete)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JournalFacade

public JournalFacade(AsyncDataManager dataManager)
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface org.apache.activeio.journal.Journal
Throws:
IOException

getMark

public org.apache.activeio.journal.RecordLocation getMark()
                                                   throws IllegalStateException
Specified by:
getMark in interface org.apache.activeio.journal.Journal
Throws:
IllegalStateException

getNextRecordLocation

public org.apache.activeio.journal.RecordLocation getNextRecordLocation(org.apache.activeio.journal.RecordLocation location)
                                                                 throws org.apache.activeio.journal.InvalidRecordLocationException,
                                                                        IOException,
                                                                        IllegalStateException
Specified by:
getNextRecordLocation in interface org.apache.activeio.journal.Journal
Throws:
org.apache.activeio.journal.InvalidRecordLocationException
IOException
IllegalStateException

read

public org.apache.activeio.packet.Packet read(org.apache.activeio.journal.RecordLocation location)
                                       throws org.apache.activeio.journal.InvalidRecordLocationException,
                                              IOException,
                                              IllegalStateException
Specified by:
read in interface org.apache.activeio.journal.Journal
Throws:
org.apache.activeio.journal.InvalidRecordLocationException
IOException
IllegalStateException

setJournalEventListener

public void setJournalEventListener(org.apache.activeio.journal.JournalEventListener listener)
                             throws IllegalStateException
Specified by:
setJournalEventListener in interface org.apache.activeio.journal.Journal
Throws:
IllegalStateException

setMark

public void setMark(org.apache.activeio.journal.RecordLocation location,
                    boolean sync)
             throws org.apache.activeio.journal.InvalidRecordLocationException,
                    IOException,
                    IllegalStateException
Specified by:
setMark in interface org.apache.activeio.journal.Journal
Throws:
org.apache.activeio.journal.InvalidRecordLocationException
IOException
IllegalStateException

write

public org.apache.activeio.journal.RecordLocation write(org.apache.activeio.packet.Packet packet,
                                                        boolean sync)
                                                 throws IOException,
                                                        IllegalStateException
Specified by:
write in interface org.apache.activeio.journal.Journal
Throws:
IOException
IllegalStateException

write

public org.apache.activeio.journal.RecordLocation write(org.apache.activeio.packet.Packet packet,
                                                        Runnable onComplete)
                                                 throws IOException,
                                                        IllegalStateException
Throws:
IOException
IllegalStateException


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.