public class TTLReadFilter extends ReadFilter
ReadFilter for filtering expired stream events according to TTL and current time.ALWAYS_ACCEPT, ALWAYS_REJECT_OFFSET| Constructor and Description |
|---|
TTLReadFilter(long ttl) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptTimestamp(long timestamp)
Accept or reject based on event timestamp.
|
protected long |
getCurrentTime() |
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. |
long |
getTTL() |
void |
reset()
Invoked before filtering a new data block.
|
acceptOffsetpublic final long getTTL()
public void reset()
ReadFilterreset in class ReadFilterpublic final boolean acceptTimestamp(long timestamp)
ReadFilteracceptTimestamp in class ReadFiltertimestamp - The timestamp of the event.true to accept, false to reject.public final 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 ReadFilterprotected long getCurrentTime()
Copyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.