org.jnetstream.capture.file
Interface FileIterator<G,S,R>
- Type Parameters:
G - Type for all getter methods. Any method that returns an object will
use this type.S - Type for all setter methods. Any method that uses setter methods
such as add or swap will use this type.R - Type for all remove methods. Any method that uses any of the remove
or retain methods, will use this type.
- All Superinterfaces:
- java.io.Closeable, FileModifier<S,R>, java.io.Flushable, com.slytechs.utils.collection.IOAddable<S>, com.slytechs.utils.collection.IOIterator<G>, com.slytechs.utils.collection.IOPositional, com.slytechs.utils.collection.IORemovable, com.slytechs.utils.collection.IOSeekable<G>, com.slytechs.utils.collection.IOSeekableFirstLast, com.slytechs.utils.collection.IOSkippable, com.slytechs.utils.collection.IOSkippableIterator<G>
- All Known Subinterfaces:
- NAPBlockRecordIterator, NAPDataRecordIterator, NAPDataRecordModifier, PacketIterator<I>, RawIterator, RecordIterator<T>
public interface FileIterator<G,S,R>
- extends com.slytechs.utils.collection.IOSeekableFirstLast, com.slytechs.utils.collection.IOSkippableIterator<G>, FileModifier<S,R>, com.slytechs.utils.collection.IOSeekable<G>, com.slytechs.utils.collection.IOPositional, java.io.Flushable, java.io.Closeable
An iterator that allows iteration over elements contained in a capture file.
Simple IOIterator.next() and IOIterator.hasNext() methods are
used to iterator over a long sequence of element which reside physically on a
some storage device. The element can be a packet, a record or in raw mode
specifically configured ByteBuffer objects. *
- Author:
- Mark Bednarczyk, Sly Technologies, Inc.
| Nested classes/interfaces inherited from interface com.slytechs.utils.collection.IOIterator |
com.slytechs.utils.collection.IOIterator.IteratorAdapter<E> |
|
Method Summary |
com.slytechs.utils.collection.SeekResult |
seek(long seconds,
long nanos)
Seeks or searches for the first record within the iterator starting at the
beggining, that has its capture timestamp equal or older then the specified
timestamp. |
void |
setAutoflush(boolean state)
|
| Methods inherited from interface com.slytechs.utils.collection.IOSeekableFirstLast |
seekEnd, seekFirst, seekLast |
| Methods inherited from interface com.slytechs.utils.collection.IOSkippable |
skip |
| Methods inherited from interface com.slytechs.utils.collection.IOIterator |
hasNext, next, remove |
| Methods inherited from interface org.jnetstream.capture.file.FileModifier |
abortChanges, add, addAll, addAll, remove, removeAll, removeAll, removeAll, removeAll, replace, retainAll, retainAll, swap |
| Methods inherited from interface com.slytechs.utils.collection.IOSeekable |
seek, seek |
| Methods inherited from interface com.slytechs.utils.collection.IOPositional |
getPosition, setPosition, setPosition |
| Methods inherited from interface java.io.Flushable |
flush |
| Methods inherited from interface java.io.Closeable |
close |
seek
com.slytechs.utils.collection.SeekResult seek(long seconds,
long nanos)
throws java.io.IOException
- Seeks or searches for the first record within the iterator starting at the
beggining, that has its capture timestamp equal or older then the specified
timestamp. Another words, the iterator will be positioned at the packet
with the timestamp closest to this user supplied earliestTimestamp but not
before this timestamp.
- Parameters:
seconds - earliest timestamp to search fornanos - nanos second fraction of the timestamp with valid range of 0 to
999,999,999
- Returns:
- the status of the seek
- Throws:
java.io.IOException - any IO errors
setAutoflush
void setAutoflush(boolean state)
throws java.io.IOException
- Throws:
java.io.IOException