@API(value=EXPERIMENTAL) public class PassThroughRecordStoreStateCache extends Object implements FDBRecordStoreStateCache
FDBRecordStoreStateCache
interface that does not actually cache anything. This should
be used if caching the record store state is not desired. For example, this might be the case if the cache miss rate
is high and therefore keeping the machinery around to maintain the cache is not worth the cost. This is also the
default implementation.
Note that this class is a singleton as it requires no state.
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.
|
static PassThroughRecordStoreStateCache |
instance() |
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
@Nonnull public static PassThroughRecordStoreStateCache instance()