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

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

public class DataFile
extends LinkedNode
implements java.lang.Comparable<DataFile>

DataFile


Field Summary
protected  java.lang.Integer dataFileId
           
protected  java.io.File file
           
protected  int length
           
protected  int preferedSize
           
protected  int referenceCount
           
 
Fields inherited from class org.apache.activemq.util.LinkedNode
next, prev, tail
 
Method Summary
 void closeRandomAccessFile(java.io.RandomAccessFile file)
           
 int compareTo(DataFile df)
           
 int decrement()
           
 boolean delete()
           
 boolean equals(java.lang.Object o)
           
 java.lang.Integer getDataFileId()
           
 int getLength()
           
 int getReferenceCount()
           
 int hashCode()
           
 int increment()
           
 void incrementLength(int size)
           
 boolean isUnused()
           
 void move(java.io.File targetDirectory)
           
 java.io.RandomAccessFile openRandomAccessFile(boolean appender)
           
 void setLength(int length)
           
 java.lang.String 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
 

Field Detail

file

protected final java.io.File file

dataFileId

protected final java.lang.Integer dataFileId

preferedSize

protected final int preferedSize

length

protected int length

referenceCount

protected int referenceCount
Method Detail

getDataFileId

public java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object

openRandomAccessFile

public java.io.RandomAccessFile openRandomAccessFile(boolean appender)
                                              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

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-2011 FuseSource, Corp.. All Rights Reserved.