org.apache.activemq.kaha.impl.async
Class DataFile
java.lang.Object
org.apache.activemq.util.LinkedNode
org.apache.activemq.kaha.impl.async.DataFile
- All Implemented Interfaces:
- Comparable<DataFile>
- Direct Known Subclasses:
- ReadOnlyDataFile
public class DataFile
- extends LinkedNode
- implements Comparable<DataFile>
DataFile
- Version:
- $Revision: 1.1.1.1 $
file
protected final File file
dataFileId
protected final Integer dataFileId
preferedSize
protected final int preferedSize
length
protected int length
referenceCount
protected int referenceCount
getDataFileId
public Integer getDataFileId()
getLength
public int getLength()
setLength
public void setLength(int length)
incrementLength
public void incrementLength(int size)
increment
public int increment()
decrement
public int decrement()
getReferenceCount
public int getReferenceCount()
isUnused
public boolean isUnused()
toString
public String toString()
- Overrides:
toString
in class Object
openRandomAccessFile
public RandomAccessFile openRandomAccessFile(boolean appender)
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
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.