Interface LogEntrySet
- All Superinterfaces:
Iterable<LogEntry>,Serializable
As the name implies,
LogEntrySet represents a set or list of log
entries.
A log entry set can be accesses concurrently. Each LogEntrySet.Cursor maintains
an internal position that points to the current log entry. The values of the
current entry can be accessed through the methods of LogEntry (which
LogEntrySet.Cursor extends). The cursor either points to an entry or it may also
be positioned before the first or after the last entry. In the latter cases
the accessor methods will of course fail.
Cursor cursor = logEntrySet.getCursor();
while (cursor.nextEntry())
{
...
}
- Author:
- Patrick Schmidt
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longGenerated ID for serialisation. -
Method Summary
Modifier and TypeMethodDescriptionReturns a cursor positioned before the first entry.getCursor(int position) Returns a cursor positioned at the specified position.intReturns the number of log entries in this log entry set.Returns the schema of this log entry.iterator()Returns an iterator over this log entry sets entries.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
serialVersionUID
static final long serialVersionUIDGenerated ID for serialisation.- See Also:
-
-
Method Details
-
getSchema
Schema getSchema()Returns the schema of this log entry.- Returns:
- the schema of this log entry
-
getEntryCount
int getEntryCount()Returns the number of log entries in this log entry set.- Returns:
- the number of log entries in this log entry set
-
getCursor
LogEntrySet.Cursor getCursor()Returns a cursor positioned before the first entry.- Returns:
- a cursor positioned before the first entry
-
getCursor
Returns a cursor positioned at the specified position.- Parameters:
position- the initial position of the cursor- Returns:
- a cursor positioned at the specified position
-
iterator
Returns an iterator over this log entry sets entries. Please be aware: the iterated log entries are all backed by the sameLogEntrySet.Cursor, so keeping a reference to a log entry will NOT have the typically expected effect.
-