org.apache.kahadb.journal
Class DataFile
java.lang.Object
org.apache.kahadb.util.LinkedNode<DataFile>
org.apache.kahadb.journal.DataFile
- All Implemented Interfaces:
- java.lang.Comparable<DataFile>
- Direct Known Subclasses:
- ReadOnlyDataFile
public class DataFile
- extends LinkedNode<DataFile>
- implements java.lang.Comparable<DataFile>
DataFile
Methods inherited from class org.apache.kahadb.util.LinkedNode |
getHeadNode, getList, getNext, getNextCircular, getPrevious, getPreviousCircular, getTailNode, isHeadNode, isLinked, isTailNode, linkAfter, linkAfter, linkBefore, linkBefore, linkToHead, linkToTail, splitAfter, splitBefore, unlink |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
file
protected final java.io.File file
dataFileId
protected final java.lang.Integer dataFileId
length
protected int length
corruptedBlocks
protected final SequenceSet corruptedBlocks
getFile
public java.io.File getFile()
getDataFileId
public java.lang.Integer getDataFileId()
getLength
public int getLength()
setLength
public void setLength(int length)
incrementLength
public void incrementLength(int size)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
openRandomAccessFile
public java.io.RandomAccessFile openRandomAccessFile()
throws java.io.IOException
- Throws:
java.io.IOException
closeRandomAccessFile
public void closeRandomAccessFile(java.io.RandomAccessFile file)
throws java.io.IOException
- Throws:
java.io.IOException
delete
public boolean delete()
throws java.io.IOException
- Throws:
java.io.IOException
move
public void move(java.io.File targetDirectory)
throws java.io.IOException
- Throws:
java.io.IOException
getCorruptedBlocks
public SequenceSet getCorruptedBlocks()
compareTo
public int compareTo(DataFile df)
- Specified by:
compareTo
in interface java.lang.Comparable<DataFile>
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
Copyright © 2005-2012. All Rights Reserved.