org.mbari.siam.core
Class DeviceLogIndex.JournalEntry

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

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

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


Field Summary
protected  int _lastEntryAccessed
          Index of last sequentially-accessed entry.
protected  long _lastMetadataRef
           
protected  long _lastSequenceNumber
           
protected  long _maxKey
          Maximum key value in log.
protected  long _minKey
          Minimum key value in log.
protected  int _numEntries
          Number of entries, not including journal entry.
protected static int LOG_JOURNAL_ENTRY_SIZE
           
 
Constructor Summary
protected DeviceLogIndex.JournalEntry()
          No-argument constructor.
protected DeviceLogIndex.JournalEntry(int numEntries, int lastEntryAccessed, long minKey, long maxKey, long lastSequenceNumber, long lastMetadataRef)
          Constructor with specified member values.
 
Method Summary
protected  void fromFile(java.io.RandomAccessFile file)
          Deserializes this index entry from the index file
protected  int getLastEntryAccessed()
          Return index of last sequentially accessed entry.
protected  long getLastMetadataRef()
          Return last packet metadata reference.
protected  long getLastSequenceNumber()
          Return last packet sequence number.
protected  long getMaxKey()
          Return log's maximum key value.
protected  long getMinKey()
          Return log's minimum key value.
protected  int getNumEntries()
          Return number of index entries (not including journal entry).
protected  void toFile(java.io.RandomAccessFile file)
          serializes this index entry and writes it to the index file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_JOURNAL_ENTRY_SIZE

protected static final int LOG_JOURNAL_ENTRY_SIZE
See Also:
Constant Field Values

_numEntries

protected int _numEntries
Number of entries, not including journal entry.


_lastEntryAccessed

protected int _lastEntryAccessed
Index of last sequentially-accessed entry.


_minKey

protected long _minKey
Minimum key value in log.


_maxKey

protected long _maxKey
Maximum key value in log.


_lastSequenceNumber

protected long _lastSequenceNumber

_lastMetadataRef

protected long _lastMetadataRef
Constructor Detail

DeviceLogIndex.JournalEntry

protected DeviceLogIndex.JournalEntry()
No-argument constructor.


DeviceLogIndex.JournalEntry

protected DeviceLogIndex.JournalEntry(int numEntries,
                                      int lastEntryAccessed,
                                      long minKey,
                                      long maxKey,
                                      long lastSequenceNumber,
                                      long lastMetadataRef)
Constructor with specified member values.

Method Detail

getMinKey

protected long getMinKey()
Return log's minimum key value.


getMaxKey

protected long getMaxKey()
Return log's maximum key value.


getLastEntryAccessed

protected int getLastEntryAccessed()
Return index of last sequentially accessed entry.


getNumEntries

protected int getNumEntries()
Return number of index entries (not including journal entry).


getLastSequenceNumber

protected long getLastSequenceNumber()
Return last packet sequence number.


getLastMetadataRef

protected long getLastMetadataRef()
Return last packet metadata reference.


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


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.