T - comparable data typepublic class Like<T extends Comparable<T>> extends Object implements Filter
| Modifier and Type | Field and Description |
|---|---|
protected FilterType |
filterType |
protected Pattern |
pattern |
protected String |
value |
| Constructor and Description |
|---|
Like(String value,
FilterType filterType)
The main idea of this part comes from
https://codereview.stackexchange.com/questions/36861/convert-sql-like-to-regex/36864
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containStartEndTime(long startTime,
long endTime)
To examine whether the partition [startTime, endTime] is subsets of filter.
|
Filter |
copy() |
void |
deserialize(ByteBuffer buffer) |
FilterSerializeId |
getSerializeId() |
boolean |
satisfy(long time,
Object value)
To examine whether the single point(with time and value) is satisfied with the filter.
|
boolean |
satisfy(Statistics statistics)
To examine whether the statistics is satisfied with the filter.
|
boolean |
satisfyStartEndTime(long startTime,
long endTime)
To examine whether the min time and max time are satisfied with the filter.
|
void |
serialize(DataOutputStream outputStream) |
String |
toString() |
String |
unescapeString(String value)
This Method is for unescaping strings except '\' before special string '%', '_', '\', because
we need to use '\' to judege whether to replace this to regexp string
|
protected String value
protected FilterType filterType
protected Pattern pattern
public Like(String value, FilterType filterType)
public boolean satisfy(Statistics statistics)
Filterpublic boolean satisfy(long time,
Object value)
Filterpublic boolean satisfyStartEndTime(long startTime,
long endTime)
FiltersatisfyStartEndTime in interface FilterstartTime - start time of a page, series or deviceendTime - end time of a page, series or devicepublic boolean containStartEndTime(long startTime,
long endTime)
FiltercontainStartEndTime in interface FilterstartTime - start time of a partitionendTime - end time of a partitionpublic void serialize(DataOutputStream outputStream)
public void deserialize(ByteBuffer buffer)
deserialize in interface Filterpublic FilterSerializeId getSerializeId()
getSerializeId in interface FilterCopyright © 2022 The Apache Software Foundation. All rights reserved.