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

java.lang.Object
  extended by org.apache.activemq.kaha.impl.async.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
static byte MARK_TYPE
           
static int NOT_SET
           
static byte NOT_SET_TYPE
           
static byte USER_TYPE
           
 
Constructor Summary
Location()
           
 
Method Summary
 int compareTo(Location o)
           
 boolean equals(Object o)
           
 int getDataFileId()
           
 CountDownLatch getLatch()
           
 int getOffset()
           
 int getPaylodSize()
           
 int getSize()
           
 byte getType()
           
 int hashCode()
           
 void readExternal(DataInput dis)
           
 void setDataFileId(int file)
           
 void setLatch(CountDownLatch latch)
           
 void setOffset(int offset)
           
 void setSize(int size)
           
 void setType(byte type)
           
 String toString()
           
 void writeExternal(DataOutput dos)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MARK_TYPE

public static final byte MARK_TYPE
See Also:
Constant Field Values

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()
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.

getPaylodSize

public int getPaylodSize()
Returns:
the size of the payload of the record.

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)

toString

public String toString()
Overrides:
toString in class Object

writeExternal

public void writeExternal(DataOutput dos)
                   throws IOException
Throws:
IOException

readExternal

public void readExternal(DataInput dis)
                  throws IOException
Throws:
IOException

getLatch

public CountDownLatch getLatch()

setLatch

public void setLatch(CountDownLatch latch)

compareTo

public int compareTo(Location o)
Specified by:
compareTo in interface Comparable<Location>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.