Interface LogEntrySet
-
- All Superinterfaces:
Iterable<LogEntry>
,Serializable
public interface LogEntrySet extends 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 ofLogEntry
(whichLogEntrySet.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 Modifier and Type Interface Description static interface
LogEntrySet.Cursor
-
Field Summary
Fields Modifier and Type Field Description static long
serialVersionUID
Generated ID for serialisation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LogEntrySet.Cursor
getCursor()
Returns a cursor positioned before the first entry.LogEntrySet.Cursor
getCursor(int position)
Returns a cursor positioned at the specified position.int
getEntryCount()
Returns the number of log entries in this log entry set.Schema
getSchema()
Returns the schema of this log entry.Iterator<LogEntry>
iterator()
Returns an iterator over this log entry sets entries.-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
Generated ID for serialisation.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
LogEntrySet.Cursor getCursor(int position)
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
Iterator<LogEntry> 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.
-
-