org.apache.kahadb.journal
Class ReadOnlyJournal

java.lang.Object
  extended by org.apache.kahadb.journal.Journal
      extended by org.apache.kahadb.journal.ReadOnlyJournal

public class ReadOnlyJournal
extends Journal

An AsyncDataManager that works in read only mode against multiple data directories. Useful for reading back archived data files.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.kahadb.journal.Journal
Journal.WriteCommand, Journal.WriteKey
 
Field Summary
 
Fields inherited from class org.apache.kahadb.journal.Journal
accessorPool, appender, archiveDataLogs, BATCH_CONTROL_RECORD_HEADER, BATCH_CONTROL_RECORD_MAGIC, BATCH_CONTROL_RECORD_SIZE, BATCH_CONTROL_RECORD_TYPE, CALLER_BUFFER_APPENDER, callerBufferAppender, checkForCorruptionOnStartup, checksum, cleanupTask, dataFiles, DEFAULT_ARCHIVE_DIRECTORY, DEFAULT_CLEANUP_INTERVAL, DEFAULT_DIRECTORY, DEFAULT_FILE_PREFIX, DEFAULT_FILE_SUFFIX, DEFAULT_MAX_FILE_LENGTH, DEFAULT_MAX_WRITE_BATCH_SIZE, directory, directoryArchive, enableAsyncDiskSync, fileByFileMap, fileMap, filePrefix, fileSuffix, inflightWrites, lastAppendLocation, maxFileLength, PREFERED_DIFF, preferedFileLength, RECORD_HEAD_SPACE, started, totalLength, USER_RECORD_TYPE, writeBatchSize
 
Constructor Summary
ReadOnlyJournal(java.util.ArrayList<java.io.File> dirs)
           
 
Method Summary
 void close()
           
 boolean delete()
           
 Location getFirstLocation()
           
 void start()
           
 
Methods inherited from class org.apache.kahadb.journal.Journal
appendedExternally, checkBatchRecord, cleanup, getCurrentDataFileId, getDirectory, getDirectoryArchive, getDiskSize, getFile, getFileMap, getFilePrefix, getFiles, getFileSuffix, getInflightWrites, getLastAppendLocation, getMaxFileLength, getNextLocation, getNextLocation, getNextLocation, getReplicationTarget, getWriteBatchSize, isArchiveDataLogs, isCheckForCorruptionOnStartup, isChecksum, isEnableAsyncDiskSync, length, read, recoveryCheck, removeDataFiles, setArchiveDataLogs, setCheckForCorruptionOnStartup, setChecksum, setDirectory, setDirectoryArchive, setEnableAsyncDiskSync, setFilePrefix, setFileSuffix, setLastAppendLocation, setMaxFileLength, setReplicationTarget, setSizeAccumulator, setWriteBatchSize, toString, update, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReadOnlyJournal

public ReadOnlyJournal(java.util.ArrayList<java.io.File> dirs)
Method Detail

start

public void start()
           throws java.io.IOException
Overrides:
start in class Journal
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Overrides:
close in class Journal
Throws:
java.io.IOException

getFirstLocation

public Location getFirstLocation()
                          throws java.lang.IllegalStateException,
                                 java.io.IOException
Throws:
java.lang.IllegalStateException
java.io.IOException

delete

public boolean delete()
               throws java.io.IOException
Overrides:
delete in class Journal
Throws:
java.io.IOException


Copyright © 2005-2012. All Rights Reserved.