@API(value=MAINTAINED) public class ScopedInterningLayer extends LocatableResolver
LocatableResolver
that is backed by the StringInterningLayer
.LocatableResolver.LocatableResolverLockedException
database, hashCode, location
Constructor and Description |
---|
ScopedInterningLayer(FDBDatabase database,
ResolvedKeySpacePath path)
Creates a resolver rooted at the provided
KeySpacePath . |
ScopedInterningLayer(FDBRecordContext context,
KeySpacePath path)
Deprecated.
|
create, disableWriteLock, enableWriteLock, equals, exclusiveLock, getBaseSubspace, getDatabase, getMappingSubspace, getVersion, hashCode, incrementVersion, mustResolve, mustResolveWithMetadata, resolve, resolve, resolve, resolve, resolve, resolve, resolveWithMetadata, resolveWithMetadata, resolveWithMetadata, retired, retiredSkipCache, retireLayer, reverseLookup, setMapping, toString, updateMetadataAndVersion, wrap
@Deprecated @API(value=DEPRECATED) public ScopedInterningLayer(@Nonnull FDBRecordContext context, @Nonnull KeySpacePath path)
ScopedInterningLayer(FDBDatabase, ResolvedKeySpacePath)
insteadKeySpacePath
.context
- context used to resolve the provided path
. This context
is only used during the construction of this class and at no other pointpath
- the KeySpacePath
where this resolver is rootedpublic ScopedInterningLayer(@Nonnull FDBDatabase database, @Nonnull ResolvedKeySpacePath path)
KeySpacePath
.database
- database that will be used when resolving valuespath
- the ResolvedKeySpacePath
where this resolver is rootedpublic static ScopedInterningLayer global(@Nonnull FDBDatabase database)
database
- the FDBDatabase
for this resolverScopedInterningLayer
for this databaseprotected CompletableFuture<Optional<ResolverResult>> read(@Nonnull FDBRecordContext context, String key)
read
in class LocatableResolver
protected CompletableFuture<ResolverResult> create(@Nonnull FDBRecordContext context, @Nonnull String key, @Nullable byte[] metadata)
create
in class LocatableResolver
protected CompletableFuture<Optional<String>> readReverse(FDBStoreTimer timer, Long value)
readReverse
in class LocatableResolver
public CompletableFuture<Void> setMapping(FDBRecordContext context, String key, ResolverResult value)
setMapping
in class LocatableResolver
public CompletableFuture<Void> updateMetadata(@Nonnull FDBRecordContext context, @Nonnull String key, @Nullable byte[] metadata)
updateMetadata
in class LocatableResolver
public CompletableFuture<Void> setWindow(long count)
setWindow
in class LocatableResolver
protected CompletableFuture<Subspace> getStateSubspaceAsync()
getStateSubspaceAsync
in class LocatableResolver
@Nonnull public CompletableFuture<Subspace> getMappingSubspaceAsync()
LocatableResolver
CompletableFuture
that will contain the Subspace
where this resolver stores
the mappings from key
String
s to value
Long
. Direct access
to this subspace is not needed by general users and extreme care should be taken when interacting with it.getMappingSubspaceAsync
in class LocatableResolver
@Nonnull public CompletableFuture<Subspace> getBaseSubspaceAsync()
LocatableResolver
CompletableFuture
that will contain the Subspace
this resolver is rooted
at (e.g. the global resolver ExtendedDirectoryLayer.global(FDBDatabase)
has a base
subspace at the root of the FDB keyspace. Note that this is not the subspace where the resolver
maintains its allocation keys (see LocatableResolver.getMappingSubspaceAsync()
).getBaseSubspaceAsync
in class LocatableResolver
@Nonnull public ResolverResult deserializeValue(byte[] value)
LocatableResolver
deserializeValue
in class LocatableResolver
value
- raw value bytes.ResolverResult
.