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

java.lang.Object
  extended by org.apache.activemq.util.LinkedNode
      extended by org.apache.activemq.kaha.impl.async.DataFile
          extended by org.apache.activemq.kaha.impl.async.ReadOnlyDataFile
All Implemented Interfaces:
Comparable<DataFile>

public class ReadOnlyDataFile
extends DataFile

Allows you to open a data file in read only mode. Useful when working with archived data files.


Field Summary
 
Fields inherited from class org.apache.activemq.kaha.impl.async.DataFile
dataFileId, file, length, preferedSize, referenceCount
 
Fields inherited from class org.apache.activemq.util.LinkedNode
next, prev, tail
 
Method Summary
 void closeRandomAccessFile(RandomAccessFile file)
           
 boolean delete()
           
 void move(File targetDirectory)
           
 RandomAccessFile openRandomAccessFile(boolean appender)
           
 
Methods inherited from class org.apache.activemq.kaha.impl.async.DataFile
compareTo, decrement, equals, getDataFileId, getLength, getReferenceCount, hashCode, increment, incrementLength, isUnused, setLength, toString
 
Methods inherited from class org.apache.activemq.util.LinkedNode
getHeadNode, getNext, getPrevious, getTailNode, isHeadNode, isTailNode, linkAfter, linkBefore, reset, unlink
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

openRandomAccessFile

public RandomAccessFile openRandomAccessFile(boolean appender)
                                      throws IOException
Overrides:
openRandomAccessFile in class DataFile
Throws:
IOException

closeRandomAccessFile

public void closeRandomAccessFile(RandomAccessFile file)
                           throws IOException
Overrides:
closeRandomAccessFile in class DataFile
Throws:
IOException

delete

public boolean delete()
               throws IOException
Overrides:
delete in class DataFile
Throws:
IOException

move

public void move(File targetDirectory)
          throws IOException
Overrides:
move in class DataFile
Throws:
IOException


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