org.mbari.siam.core
Class DeviceLogIndex.Entry

java.lang.Object
  extended by org.mbari.siam.core.DeviceLogIndex.Entry
Enclosing class:
DeviceLogIndex

protected static class DeviceLogIndex.Entry
extends java.lang.Object

This class provides a container for each indexing information entry. It is not meant to be instantiated directly, but is utilized by the DeviceLogIndex class.


Field Summary
protected  long _dataOffset
           
protected  int _dataSize
           
protected  int _entryIndex
           
protected  long _key
           
protected  long _sequenceNumber
           
protected static int LOG_INDEX_ENTRY_SIZE
           
 
Constructor Summary
protected DeviceLogIndex.Entry()
          default constructor
protected DeviceLogIndex.Entry(DeviceLogIndex.Entry e)
           
protected DeviceLogIndex.Entry(long key, int dataSize, long dataOffset, long sequenceNumber)
          optional constructor
 
Method Summary
protected  void fromFile(java.io.RandomAccessFile file)
          deserializes this index entry from the index file
protected  long getDataOffset()
           
protected  int getDataSize()
           
protected  int getEntryIndex()
           
protected  long getKey()
          retrieves the key of this index entry
protected  long getSequenceNumber()
          retrieves the sequenceNumber of this index entry
protected  void setDataOffset(long dataOffset)
          sets the data region offset associated with this index entry
protected  void setDataSize(int dataSize)
          sets the size of the data region associated with this index entry
protected  void setEntryIndex(int index)
          sets the index number of this index entry
protected  void setKey(long key)
          sets the key of this index entry
protected  void setSequenceNumber(long sequenceNumber)
          sets the sequenceNumber of this index entry
protected  void toFile(java.io.RandomAccessFile file)
          serializes this index entry and writes it to the index file
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG_INDEX_ENTRY_SIZE

protected static final int LOG_INDEX_ENTRY_SIZE
See Also:
Constant Field Values

_entryIndex

protected int _entryIndex

_dataSize

protected int _dataSize

_dataOffset

protected long _dataOffset

_key

protected long _key

_sequenceNumber

protected long _sequenceNumber
Constructor Detail

DeviceLogIndex.Entry

protected DeviceLogIndex.Entry(long key,
                               int dataSize,
                               long dataOffset,
                               long sequenceNumber)
optional constructor

Parameters:
key - initial value of the key associated with this index entry
dataSize - size of the data region associated with this entry
dataOffset - offset of the data region associated with this entry
sequenceNumber - sequenceNumber of the data region associated with this entry

DeviceLogIndex.Entry

protected DeviceLogIndex.Entry(DeviceLogIndex.Entry e)

DeviceLogIndex.Entry

protected DeviceLogIndex.Entry()
default constructor

Method Detail

setEntryIndex

protected void setEntryIndex(int index)
sets the index number of this index entry

Parameters:
index - index number to associate with this index entry

getEntryIndex

protected int getEntryIndex()

setKey

protected void setKey(long key)
sets the key of this index entry

Parameters:
key - key to associate with this index entry

getKey

protected long getKey()
retrieves the key of this index entry


setDataSize

protected void setDataSize(int dataSize)
sets the size of the data region associated with this index entry

Parameters:
dataSize - the size of the data region associated with this entry

getDataSize

protected int getDataSize()

setDataOffset

protected void setDataOffset(long dataOffset)
sets the data region offset associated with this index entry

Parameters:
dataOffset - offset of the data region associated with this entry

getDataOffset

protected long getDataOffset()

setSequenceNumber

protected void setSequenceNumber(long sequenceNumber)
sets the sequenceNumber of this index entry

Parameters:
sequenceNumber - sequenceNumber of this index entry

getSequenceNumber

protected long getSequenceNumber()
retrieves the sequenceNumber of this index entry


toFile

protected void toFile(java.io.RandomAccessFile file)
serializes this index entry and writes it to the index file

Parameters:
file - RandomAccessFile to write index entry to

fromFile

protected void fromFile(java.io.RandomAccessFile file)
deserializes this index entry from the index file

Parameters:
file - RandomAccessFile to read index entry from

toString

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


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.