public class RangeCountProcedure extends AbstractKeyRangeIndexProcedure<Long> implements IParallelizableIndexProcedure<Long>
fromKey, toKey| Constructor and Description |
|---|
RangeCountProcedure()
De-serialization ctor.
|
RangeCountProcedure(boolean exact,
boolean deleted,
byte[] fromKey,
byte[] toKey)
Range count using the specified bounds.
|
| Modifier and Type | Method and Description |
|---|---|
Long |
apply(IIndex ndx)
Range count of entries in a key range for the index.
|
boolean |
isDeleted()
Return
true iff deleted tuples must be included in the
result. |
boolean |
isExact()
Return
true iff the result count must be exact. |
boolean |
isReadOnly()
Return
true iff the procedure asserts that it will not
write on the index. |
void |
readExternal(ObjectInput in) |
void |
writeExternal(ObjectOutput out) |
constrainFromKey, constrainToKey, getFromKey, getToKey, readKeys, writeKeyspublic RangeCountProcedure()
public RangeCountProcedure(boolean exact,
boolean deleted,
byte[] fromKey,
byte[] toKey)
exact - iff an exact range count is required.deleted - iff deleted tuples must be included in the count.fromKey - The lower bound (inclusive) -or- null if there
is no lower bound.toKey - The upper bound (exclusive) -or- null if there
is no upper bound.IllegalArgumentException - if exact is false and deleted
is true (there is no approximate reporting for
range counts of deleted and undeleted tuples).public final boolean isReadOnly()
IReadOnlytrue iff the procedure asserts that it will not
write on the index. When true, the procedure may be run
against a view of the index that is read-only or which allows concurrent
processes to read on the same index object. When false the
procedure will be run against a mutable view of the index (assuming that
the procedure is executed in a context that has access to a mutable index
view).isReadOnly in interface IReadOnlypublic final boolean isExact()
true iff the result count must be exact.public final boolean isDeleted()
true iff deleted tuples must be included in the
result.public Long apply(IIndex ndx)
Range count of entries in a key range for the index.
Note: When the index IndexMetadata.getDeleteMarkers() this method
reports the upper bound estimate of the #of key-value pairs in the key
range of the index. The estimate is an upper bound because duplicate or
deleted entries in that have not been eradicated through a suitable
compacting merge will be reported. An exact count may be obtained using a
range iterator by NOT requesting either the keys or the values.
apply in interface IIndexProcedure<Long>ndx - The index.public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class AbstractKeyRangeIndexProcedure<Long>IOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class AbstractKeyRangeIndexProcedure<Long>IOExceptionCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.