public static class JVMHashIndex.Bucket extends Object implements Iterable<JVMHashIndex.SolutionHit>, Comparable<JVMHashIndex.Bucket>
Constructor and Description |
---|
JVMHashIndex.Bucket(int hashCode,
IBindingSet solution) |
Modifier and Type | Method and Description |
---|---|
void |
add(IBindingSet solution) |
boolean |
addDistinct(IBindingSet solution)
Add the solution to the bucket iff the solutions is not already
present in the bucket.
|
int |
compareTo(JVMHashIndex.Bucket o)
Orders the buckets based on their hash codes.
|
boolean |
contains(IBindingSet bs) |
int |
hashCode() |
boolean |
isEmpty()
Return
true iff this JVMHashIndex.Bucket is empty (if there
are no solutions in the bucket). |
Iterator<JVMHashIndex.SolutionHit> |
iterator() |
String |
toString() |
public JVMHashIndex.Bucket(int hashCode, IBindingSet solution)
public void add(IBindingSet solution)
public boolean addDistinct(IBindingSet solution)
Note: There is already a hash index in place on the join variables
when we are doing a DISTINCT filter. Further, only the "join"
variables are "selected" and participate in a DISTINCT filter.
Therefore, if we have a hash collision such that two solutions would
be directed into the same JVMHashIndex.Bucket
then we can not improve
matters but must simply scan the solutions in the bucket to decide
whether the new solution duplicates a solution which is already
present.
solution
- The solution.true
iff the bucket was modified by this
operation.public boolean contains(IBindingSet bs)
bs
- the binding set to checkpublic final Iterator<JVMHashIndex.SolutionHit> iterator()
iterator
in interface Iterable<JVMHashIndex.SolutionHit>
public final int compareTo(JVMHashIndex.Bucket o)
compareTo
in interface Comparable<JVMHashIndex.Bucket>
public final boolean isEmpty()
true
iff this JVMHashIndex.Bucket
is empty (if there
are no solutions in the bucket).Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.