Package lrgs.archive
Class SearchHandle
java.lang.Object
lrgs.archive.SearchHandle
This object holds variables that are opaque to the application. They
are used by the archiving classes to keep track of the progress of a
search.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The number of indexes to allocate in the buffer.static final int
Search method for backward search from dcp specific index pointerstatic final int
Search method for forward search of index file from since to untilstatic final int
Undefined search method -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addIndex
(DcpMsgIndex idx) Adds an index to the internal buffer.int
capacity()
void
Empties the cache and resets the pointers.Return next index in buffer, or null if none.boolean
isEmpty()
-
Field Details
-
SM_UNDEFINED
public static final int SM_UNDEFINEDUndefined search method- See Also:
-
SM_INDEXSEARCH
public static final int SM_INDEXSEARCHSearch method for forward search of index file from since to until- See Also:
-
SM_BACKREF
public static final int SM_BACKREFSearch method for backward search from dcp specific index pointer- See Also:
-
INDEX_BUF_MAX
public static final int INDEX_BUF_MAXThe number of indexes to allocate in the buffer.- See Also:
-
-
Constructor Details
-
SearchHandle
Default constructor.
-
-
Method Details
-
flushBuffer
public void flushBuffer()Empties the cache and resets the pointers. -
isEmpty
public boolean isEmpty() -
capacity
public int capacity()- Returns:
- remaining capacity, i.e. number of indexes that can be held.
-
getNextIndex
Return next index in buffer, or null if none.- Returns:
- next index in buffer, or null if none.
-
addIndex
Adds an index to the internal buffer.- Parameters:
idx
- the index
-