Class Location
- java.lang.Object
-
- org.apache.activemq.store.kahadb.disk.journal.Location
-
- All Implemented Interfaces:
Comparable<Location>
public final class Location extends Object implements Comparable<Location>
Used as a location in the data store.
-
-
Field Summary
Fields Modifier and Type Field Description static intNOT_SETstatic byteNOT_SET_TYPEstatic byteUSER_TYPE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Location o)booleanequals(Object o)intgetDataFileId()AtomicReference<IOException>getException()CountDownLatchgetLatch()intgetOffset()intgetSize()bytegetType()inthashCode()voidreadExternal(DataInput dis)voidsetBatch(org.apache.activemq.store.kahadb.disk.journal.DataFileAppender.WriteBatch batch)voidsetDataFileId(int file)voidsetOffset(int offset)voidsetSize(int size)voidsetType(byte type)StringtoString()voidwriteExternal(DataOutput dos)
-
-
-
Field Detail
-
USER_TYPE
public static final byte USER_TYPE
- See Also:
- Constant Field Values
-
NOT_SET_TYPE
public static final byte NOT_SET_TYPE
- See Also:
- Constant Field Values
-
NOT_SET
public static final int NOT_SET
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Location
public Location()
-
Location
public Location(Location item)
-
Location
public Location(int dataFileId, int offset)
-
-
Method Detail
-
getSize
public int getSize()
- Returns:
- the size of the data record including the header.
-
setSize
public void setSize(int size)
- Parameters:
size- the size of the data record including the header.
-
getOffset
public int getOffset()
-
setOffset
public void setOffset(int offset)
-
getDataFileId
public int getDataFileId()
-
setDataFileId
public void setDataFileId(int file)
-
getType
public byte getType()
-
setType
public void setType(byte type)
-
writeExternal
public void writeExternal(DataOutput dos) throws IOException
- Throws:
IOException
-
readExternal
public void readExternal(DataInput dis) throws IOException
- Throws:
IOException
-
getLatch
public CountDownLatch getLatch()
-
setBatch
public void setBatch(org.apache.activemq.store.kahadb.disk.journal.DataFileAppender.WriteBatch batch)
-
compareTo
public int compareTo(Location o)
- Specified by:
compareToin interfaceComparable<Location>
-
getException
public AtomicReference<IOException> getException()
-
-