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
ConstructorsConstructorDescriptionExplicitBucketSource(Set<com.yahoo.document.BucketId> superbuckets, int distributionBitCount, ProgressToken progress) -
Method Summary
Modifier and TypeMethodDescriptionintgetNext()longbooleanhasNext()voidsetDistributionBitCount(int distributionBitCount, ProgressToken progress) booleanvoidupdate(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:
hasNextin interfaceVisitorIterator.BucketSource
-
shouldYield
public boolean shouldYield()- Specified by:
shouldYieldin interfaceVisitorIterator.BucketSource
-
visitsAllBuckets
public boolean visitsAllBuckets()- Specified by:
visitsAllBucketsin interfaceVisitorIterator.BucketSource
-
getTotalBucketCount
public long getTotalBucketCount()- Specified by:
getTotalBucketCountin interfaceVisitorIterator.BucketSource
-
getNext
- Specified by:
getNextin interfaceVisitorIterator.BucketSource
-
getDistributionBitCount
public int getDistributionBitCount()- Specified by:
getDistributionBitCountin interfaceVisitorIterator.BucketSource
-
setDistributionBitCount
- Specified by:
setDistributionBitCountin interfaceVisitorIterator.BucketSource
-
update
public void update(com.yahoo.document.BucketId superbucket, com.yahoo.document.BucketId progress, ProgressToken token) - Specified by:
updatein interfaceVisitorIterator.BucketSource
-