@API(value=EXPERIMENTAL) public class VersionIndexMaintainer extends StandardIndexMaintainer
IndexMaintainer
for the "version" index type. Here, the keys of the index are
required to have exactly one column that is of type Version
.
If records are added to this index with a complete FDBRecordVersion
associated
with it, then the given version is used. If it is associated with an incomplete RecordVersion
,
then it will set the key in such a way that the global version is filled in when the record is committed.
If one only ever serializes records with incomplete RecordVersion
s, then this index guarantees
that the version column is strictly monotonically increasing with time.TOO_LARGE_VALUE_MESSAGE_LIMIT
state
Modifier | Constructor and Description |
---|---|
protected |
VersionIndexMaintainer(IndexMaintainerState state) |
Modifier and Type | Method and Description |
---|---|
RecordCursor<IndexEntry> |
scan(IndexScanType scanType,
TupleRange range,
byte[] continuation,
ScanProperties scanProperties)
Scan entries in the index.
|
protected <M extends Message> |
updateOneKey(FDBIndexableRecord<M> savedRecord,
boolean remove,
IndexEntry indexEntry)
Store a single key in the index.
|
addedRangeWithKey, canDeleteWhere, canDeleteWhere, canEvaluateAggregateFunction, canEvaluateRecordFunction, checkKeyValueSizes, commonKeys, decodeValue, deleteWhere, evaluateAggregateFunction, evaluateIndex, evaluateRecordFunction, filteredIndexEntries, getExecutor, getGroupedCount, getGroupingCount, getTimer, indexEntryKey, isIdempotent, makeMutable, performOperation, saveIndexEntryAsKeyValue, scan, scanUniquenessViolations, skipUpdateForUnchangedKeys, trimTooLargeTuple, unpackKeyValue, unpackKeyValue, update, updateIndexKeys, updateIndexKeysFunction, updateUniquenessViolations, validateEntries, validateMissingEntries, validateOrphanEntries
getIndexSubspace, getSecondarySubspace, unsupportedAggregateFunction, unsupportedRecordFunction
protected VersionIndexMaintainer(IndexMaintainerState state)
@Nonnull public RecordCursor<IndexEntry> scan(@Nonnull IndexScanType scanType, @Nonnull TupleRange range, @Nullable byte[] continuation, @Nonnull ScanProperties scanProperties)
IndexMaintainer
scan
in class IndexMaintainer
scanType
- the type
of scan to performrange
- the range to scancontinuation
- any continuation from a previous scan invocationscanProperties
- skip, limit and other properties of the scanprotected <M extends Message> void updateOneKey(@Nonnull FDBIndexableRecord<M> savedRecord, boolean remove, @Nonnull IndexEntry indexEntry)
StandardIndexMaintainer
updateOneKey
in class StandardIndexMaintainer
M
- the message type of the recordsavedRecord
- the record being indexedremove
- true
if removing from indexindexEntry
- the entry for the index to be updated