Package com.yahoo.documentapi
Class VisitorIterator.ExplicitBucketSource
java.lang.Object
com.yahoo.documentapi.VisitorIterator.ExplicitBucketSource
- All Implemented Interfaces:
VisitorIterator.BucketSource
- Enclosing class:
- VisitorIterator
protected static class VisitorIterator.ExplicitBucketSource
extends Object
implements VisitorIterator.BucketSource
Provides an explicit set of bucket IDs to iterate over. Will immediately
set these as pending in the
ProgressToken
, as it is presumed this set is
rather small. Changing the distribution bit count for this source is
effectively a no-op, as explicit bucket IDs should not be implicitly
changed.-
Constructor Summary
ConstructorDescriptionExplicitBucketSource
(Set<com.yahoo.document.BucketId> superbuckets, int distributionBitCount, ProgressToken progress) -
Method Summary
Modifier and TypeMethodDescriptionint
getNext()
long
boolean
hasNext()
void
setDistributionBitCount
(int distributionBitCount, ProgressToken progress) boolean
void
update
(com.yahoo.document.BucketId superbucket, com.yahoo.document.BucketId progress, ProgressToken token) boolean
-
Constructor Details
-
ExplicitBucketSource
public ExplicitBucketSource(Set<com.yahoo.document.BucketId> superbuckets, int distributionBitCount, ProgressToken progress)
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceVisitorIterator.BucketSource
-
shouldYield
public boolean shouldYield()- Specified by:
shouldYield
in interfaceVisitorIterator.BucketSource
-
visitsAllBuckets
public boolean visitsAllBuckets()- Specified by:
visitsAllBuckets
in interfaceVisitorIterator.BucketSource
-
getTotalBucketCount
public long getTotalBucketCount()- Specified by:
getTotalBucketCount
in interfaceVisitorIterator.BucketSource
-
getNext
- Specified by:
getNext
in interfaceVisitorIterator.BucketSource
-
getDistributionBitCount
public int getDistributionBitCount()- Specified by:
getDistributionBitCount
in interfaceVisitorIterator.BucketSource
-
setDistributionBitCount
- Specified by:
setDistributionBitCount
in interfaceVisitorIterator.BucketSource
-
update
public void update(com.yahoo.document.BucketId superbucket, com.yahoo.document.BucketId progress, ProgressToken token) - Specified by:
update
in interfaceVisitorIterator.BucketSource
-