Interface FDBRecordStoreBase.UserVersionChecker
-
- Enclosing interface:
- FDBRecordStoreBase<M extends Message>
public static interface FDBRecordStoreBase.UserVersionChecker
Hook for checking if store state for client changes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CompletableFuture<Integer>
checkUserVersion(int oldUserVersion, int oldMetaDataVersion, RecordMetaDataProvider metaData)
Check the user version.default IndexState
needRebuildIndex(Index index, long recordCount, boolean indexOnNewRecordTypes)
Determine what to do about an index needing to be built.
-
-
-
Method Detail
-
checkUserVersion
CompletableFuture<Integer> checkUserVersion(int oldUserVersion, int oldMetaDataVersion, RecordMetaDataProvider metaData)
Check the user version.- Parameters:
oldUserVersion
- the old user version or-1
if this is a new record storeoldMetaDataVersion
- the old meta-data versionmetaData
- the meta-data provider that will be used to get meta-data- Returns:
- the user version to store in the record info header
-
needRebuildIndex
default IndexState needRebuildIndex(Index index, long recordCount, boolean indexOnNewRecordTypes)
Determine what to do about an index needing to be built.- Parameters:
index
- the index that has not been built for this storerecordCount
- the number of records already in the storeindexOnNewRecordTypes
-true
if all record types for the index are new (the number of records related to this index is 0), in which case the index is able to be "rebuilt" instantly with no cost.- Returns:
- the desired state of the new index. If this is
IndexState.READABLE
, the index will be built right away
-
-