org.apache.kahadb.journal
Class Location

java.lang.Object
  extended by org.apache.kahadb.journal.Location
All Implemented Interfaces:
java.lang.Comparable<Location>

public final class Location
extends java.lang.Object
implements java.lang.Comparable<Location>

Used as a location in the data store.


Field Summary
static int NOT_SET
           
static byte NOT_SET_TYPE
           
static byte USER_TYPE
           
 
Constructor Summary
Location()
           
Location(int dataFileId, int offset)
           
Location(Location item)
           
 
Method Summary
 int compareTo(Location o)
           
 boolean equals(java.lang.Object o)
           
 int getDataFileId()
           
 java.util.concurrent.CountDownLatch getLatch()
           
 int getOffset()
           
 int getSize()
           
 byte getType()
           
 int hashCode()
           
 void readExternal(java.io.DataInput dis)
           
 void setDataFileId(int file)
           
 void setLatch(java.util.concurrent.CountDownLatch latch)
           
 void setOffset(int offset)
           
 void setSize(int size)
           
 void setType(byte type)
           
 java.lang.String toString()
           
 void writeExternal(java.io.DataOutput dos)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

writeExternal

public void writeExternal(java.io.DataOutput dos)
                   throws java.io.IOException
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.DataInput dis)
                  throws java.io.IOException
Throws:
java.io.IOException

getLatch

public java.util.concurrent.CountDownLatch getLatch()

setLatch

public void setLatch(java.util.concurrent.CountDownLatch latch)

compareTo

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

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-2012. All Rights Reserved.