public static interface FDBRecordStoreBase.UserVersionChecker
Modifier and Type | Method and 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.
|
CompletableFuture<Integer> checkUserVersion(int oldUserVersion, int oldMetaDataVersion, RecordMetaDataProvider metaData)
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-datadefault IndexState needRebuildIndex(Index index, long recordCount, boolean indexOnNewRecordTypes)
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.IndexState.READABLE
, the index will be built right away