org.apache.kahadb.journal
Class DataFile
java.lang.Object
org.apache.kahadb.util.LinkedNode<DataFile>
org.apache.kahadb.journal.DataFile
- All Implemented Interfaces:
- Comparable<DataFile>
- Direct Known Subclasses:
- ReadOnlyDataFile
public class DataFile
- extends LinkedNode<DataFile>
- implements Comparable<DataFile>
DataFile
- Version:
- $Revision: 805550 $
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 |
file
protected final File file
dataFileId
protected final Integer dataFileId
length
protected int length
corruptedBlocks
protected final SequenceSet corruptedBlocks
getFile
public File getFile()
getDataFileId
public Integer getDataFileId()
getLength
public int getLength()
setLength
public void setLength(int length)
incrementLength
public void incrementLength(int size)
toString
public String toString()
- Overrides:
toString
in class Object
openRandomAccessFile
public RandomAccessFile openRandomAccessFile()
throws IOException
- Throws:
IOException
closeRandomAccessFile
public void closeRandomAccessFile(RandomAccessFile file)
throws IOException
- Throws:
IOException
delete
public boolean delete()
throws IOException
- Throws:
IOException
move
public void move(File targetDirectory)
throws IOException
- Throws:
IOException
getCorruptedBlocks
public SequenceSet getCorruptedBlocks()
compareTo
public int compareTo(DataFile df)
- Specified by:
compareTo
in interface Comparable<DataFile>
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.