|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.NOPBloomFilter
public final class NOPBloomFilter
A bloom filter that never reports false (this means that you
must always check the index) and that does not permit anything to be added
and, in fact, has no state.
| Field Summary | |
|---|---|
static NOPBloomFilter |
INSTANCE
|
| Constructor Summary | |
|---|---|
NOPBloomFilter()
|
|
| Method Summary | |
|---|---|
boolean |
add(byte[] key)
Adds the key to the filter. |
boolean |
contains(byte[] key)
Returns true. |
void |
falsePos()
Notify the bloom filter that a false positive was observed for a key that for which IBloomFilter.add(byte[]) reported true (the key was
in fact not in the index). |
boolean |
isEnabled()
Returns true. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final transient NOPBloomFilter INSTANCE
| Constructor Detail |
|---|
public NOPBloomFilter()
| Method Detail |
|---|
public boolean add(byte[] key)
IBloomFilter
add in interface IBloomFilterkey - The key.
true iff the filter state was unchanged by the
incorporation of this key into the filter.
UnsupportedOperationException - always.public boolean contains(byte[] key)
true.
Note: The NOP filter returns true because a
true return by a bloom filter means that you have to test
the data, which is how we achieve NOP semantics. If this method were to
return false then it would be claiming that the key was
not in the index!!!
contains in interface IBloomFilterkey - The key.
true.public boolean isEnabled()
true.
public void falsePos()
IBloomFilterIBloomFilter.add(byte[]) reported true (the key was
in fact not in the index). This method exists solely for reporting and
tracking the actual error rate of the bloom filter.
falsePos in interface IBloomFilter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||