public class BloomFilterDuplicateRemover extends Object implements DuplicateRemover
Constructor and Description |
---|
BloomFilterDuplicateRemover(int expectedInsertions) |
BloomFilterDuplicateRemover(int expectedInsertions,
double fpp) |
Modifier and Type | Method and Description |
---|---|
int |
getTotalRequestsCount(Task task)
Get TotalRequestsCount for monitor.
|
protected String |
getUrl(Request request) |
boolean |
isDuplicate(Request request,
Task task)
Check whether the request is duplicate.
|
protected com.google.common.hash.BloomFilter<CharSequence> |
rebuildBloomFilter() |
void |
resetDuplicateCheck(Task task)
Reset duplicate check.
|
public BloomFilterDuplicateRemover(int expectedInsertions)
public BloomFilterDuplicateRemover(int expectedInsertions, double fpp)
expectedInsertions
- the number of expected insertions to the constructedfpp
- the desired false positive probability (must be positive and less than 1.0)protected com.google.common.hash.BloomFilter<CharSequence> rebuildBloomFilter()
public boolean isDuplicate(Request request, Task task)
DuplicateRemover
isDuplicate
in interface DuplicateRemover
request
- requesttask
- taskpublic void resetDuplicateCheck(Task task)
DuplicateRemover
resetDuplicateCheck
in interface DuplicateRemover
task
- taskpublic int getTotalRequestsCount(Task task)
DuplicateRemover
getTotalRequestsCount
in interface DuplicateRemover
task
- taskCopyright © 2017. All rights reserved.