public final class TimeRangeReadFilter extends ReadFilter
ReadFilter for accepting events that are within a given time range.ALWAYS_ACCEPT, ALWAYS_REJECT_OFFSET| Constructor and Description |
|---|
TimeRangeReadFilter(long startTime,
long endTime)
Creates a
TimeRangeReadFilter with the specific time range. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptTimestamp(long timestamp)
Accept or reject based on event timestamp.
|
long |
getNextTimestampHint()
If the
ReadFilter.acceptTimestamp(long) returns false, the filter can provide a hint for the next
timestamp the reader should start reading from. |
boolean |
isActive()
Returns true if this filter has been called at least once after the prior call to
reset(). |
void |
reset()
Invoked before filtering a new data block.
|
acceptOffsetpublic TimeRangeReadFilter(long startTime,
long endTime)
TimeRangeReadFilter with the specific time range.startTime - start timestamp for event to be accepted (inclusive)endTime - end timestamp for event to be accepted (exclusive)public void reset()
ReadFilterreset in class ReadFilterpublic long getNextTimestampHint()
ReadFilterReadFilter.acceptTimestamp(long) returns false, the filter can provide a hint for the next
timestamp the reader should start reading from.getNextTimestampHint in class ReadFilterpublic boolean acceptTimestamp(long timestamp)
ReadFilteracceptTimestamp in class ReadFiltertimestamp - The timestamp of the event.true to accept, false to reject.public boolean isActive()
reset().Copyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.