com.bigdata.btree.view
Class FusedView.FusedBloomFilter

java.lang.Object
  extended by com.bigdata.btree.view.FusedView.FusedBloomFilter
All Implemented Interfaces:
IBloomFilter
Enclosing class:
FusedView

protected class FusedView.FusedBloomFilter
extends Object
implements IBloomFilter

Inner class providing a fused view of the optional bloom filters associated with each of the source indices.

Version:
$Id: FusedView.java 5966 2012-02-06 16:19:20Z thompsonbry $
Author:
Bryan Thompson

Constructor Summary
protected FusedView.FusedBloomFilter()
           
 
Method Summary
 boolean add(byte[] key)
          Unsupported operation.
 boolean contains(byte[] key)
          Applies the IBloomFilter for each source index in turn and returns true if ANY of the component index filters return true (if any filters say that their index has data for that key then you need to read the index).
 void falsePos()
          This implementation notifies the bloom filter for the first source index (if it exists).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FusedView.FusedBloomFilter

protected FusedView.FusedBloomFilter()
Method Detail

add

public boolean add(byte[] key)
Unsupported operation.

Specified by:
add in interface IBloomFilter
Parameters:
key - The key.
Returns:
true iff the filter state was unchanged by the incorporation of this key into the filter.
Throws:
UnsupportedOperationException - always.

contains

public boolean contains(byte[] key)
Applies the IBloomFilter for each source index in turn and returns true if ANY of the component index filters return true (if any filters say that their index has data for that key then you need to read the index). If a filter does not exist (or has been disabled) for a given component index then the code treats the filter as always reporting true (that is, forcing us to check the index). So a source component index without a bloom filter or an index with a disabled bloom filter acts as its filter has a high false positive rate, however the test is a NOP so it is cheap.

Specified by:
contains in interface IBloomFilter
Parameters:
key - The key.
Returns:
true if the filter has either that key or some key that is hash equivalent to that key using the hashing function imposed by the filter; false iff the filter can guarantee that the key has not been added to the filter.

falsePos

public void falsePos()
This implementation notifies the bloom filter for the first source index (if it exists). Normally false positives will be reported directly to the specific bloom filter instance by the contains() or lookup() method for that index. However, the AccessPath also tests the bloom filter and needs a means to report false positives. It should be the only one that calls this method on this implementation class.

Specified by:
falsePos in interface IBloomFilter


Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.