public class RepeatedRecordHandler extends LogRecordHandler
Modifier and Type | Class and Description |
---|---|
static class |
RepeatedRecordHandler.ApproximateRepeatSemantics
Judges two records to be equal if they come from the same place,
and begin with the same string, modulo numbers
|
static class |
RepeatedRecordHandler.ExactRepeatSemantics
Judges two records to be equal if they are from the same place,
and have the same message
|
static interface |
RepeatedRecordHandler.RepeatSemantics
Determines the semantics of what constitutes a repeated record
|
Modifier and Type | Field and Description |
---|---|
static RepeatedRecordHandler.ApproximateRepeatSemantics |
APPROXIMATE |
static RepeatedRecordHandler.ExactRepeatSemantics |
EXACT |
EMPTY
Constructor and Description |
---|
RepeatedRecordHandler(RepeatedRecordHandler.RepeatSemantics repeatSemantics)
Create a new repeated log message handler, using the given semantics for what
constitutes a repeated record.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Redwood.Record> |
handle(Redwood.Record record)
Handle a log Record, either as a filter or by producing a side effect.
|
java.util.List<Redwood.Record> |
signalEndTrack(int newDepth,
long timeEnded)
Signal the end of a track, i.e.
|
java.util.List<Redwood.Record> |
signalShutdown() |
java.util.List<Redwood.Record> |
signalStartTrack(Redwood.Record signal)
Signal the start of a track, i.e.
|
public static final RepeatedRecordHandler.ApproximateRepeatSemantics APPROXIMATE
public static final RepeatedRecordHandler.ExactRepeatSemantics EXACT
public RepeatedRecordHandler(RepeatedRecordHandler.RepeatSemantics repeatSemantics)
repeatSemantics
- The semantics for what constitutes a repeated recordpublic java.util.List<Redwood.Record> handle(Redwood.Record record)
handle
in class LogRecordHandler
record
- The log record to handlepublic java.util.List<Redwood.Record> signalStartTrack(Redwood.Record signal)
signalStartTrack
in class LogRecordHandler
signal
- A record corresponding to the information in the track header.
The depth in this object is the old log depth.public java.util.List<Redwood.Record> signalEndTrack(int newDepth, long timeEnded)
signalEndTrack
in class LogRecordHandler
newDepth
- The new depth; that is, the current depth - 1.public java.util.List<Redwood.Record> signalShutdown()
signalShutdown
in class LogRecordHandler