public class MetaDataVersionStampStoreStateCache extends Object implements FDBRecordStoreStateCache
FDBRecordStoreStateCache
that uses the database's
meta-data version-stamp key as the
cache invalidation key. This will only cache the meta-data if it is "safe", that is, if the record store
has marked its state as cacheable. This means that one should first set the state cacheability to true
on any record store whose state one would want cached by calling FDBRecordStore.setStateCacheability(boolean)
.
Then only those stores will be cached by this store state cache.Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove all entries from the cache.
|
CompletableFuture<FDBRecordStoreStateCacheEntry> |
get(FDBRecordStore recordStore,
FDBRecordStoreBase.StoreExistenceCheck existenceCheck)
Load the record store state for the record store stored at the given location.
|
void |
validateDatabase(FDBDatabase database) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
validateContext
@Nonnull public CompletableFuture<FDBRecordStoreStateCacheEntry> get(@Nonnull FDBRecordStore recordStore, @Nonnull FDBRecordStoreBase.StoreExistenceCheck existenceCheck)
FDBRecordStoreStateCache
This method should generally not be called by clients importing the Record Layer.
get
in interface FDBRecordStoreStateCache
recordStore
- the record store to load the store state ofexistenceCheck
- whether to error if the store does or does not existpublic void validateDatabase(@Nonnull FDBDatabase database)
validateDatabase
in interface FDBRecordStoreStateCache
public void clear()
FDBRecordStoreStateCache
clear
in interface FDBRecordStoreStateCache