Class SubspaceProviderBySubspace
- java.lang.Object
-
- com.apple.foundationdb.record.provider.foundationdb.SubspaceProviderBySubspace
-
- All Implemented Interfaces:
SubspaceProvider
@API(INTERNAL) public class SubspaceProviderBySubspace extends Object implements SubspaceProvider
A SubspaceProvider wrapping a subspace. Getting the subspace from this provider is not blocking.
-
-
Constructor Summary
Constructors Constructor Description SubspaceProviderBySubspace(Subspace subspace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
Subspace
getSubspace(FDBRecordContext context)
This might be blocking if the subspace is never fetched before.CompletableFuture<Subspace>
getSubspaceAsync(FDBRecordContext context)
Asynchronously resolves the subspace against the database associated withFDBRecordContext
.int
hashCode()
LogMessageKeys
logKey()
String
toString()
String
toString(FDBRecordContext context)
This method is typically called in support of error logging; hence, implementations should not assume a workingFDBRecordContext
but might, for example, use it to retrieve a subspace previously resolved against the corresponding database.
-
-
-
Method Detail
-
getSubspace
@Nonnull public Subspace getSubspace(@Nonnull FDBRecordContext context)
Description copied from interface:SubspaceProvider
This might be blocking if the subspace is never fetched before.- Specified by:
getSubspace
in interfaceSubspaceProvider
- Parameters:
context
- record context used to resolve the subspace- Returns:
- Subspace
-
getSubspaceAsync
@Nonnull public CompletableFuture<Subspace> getSubspaceAsync(@Nonnull FDBRecordContext context)
Description copied from interface:SubspaceProvider
Asynchronously resolves the subspace against the database associated withFDBRecordContext
.- Specified by:
getSubspaceAsync
in interfaceSubspaceProvider
- Parameters:
context
- record context used to resolve the subspace- Returns:
- CompletableFuture<Subspace>
-
logKey
@Nonnull public LogMessageKeys logKey()
- Specified by:
logKey
in interfaceSubspaceProvider
-
toString
public String toString(@Nonnull FDBRecordContext context)
Description copied from interface:SubspaceProvider
This method is typically called in support of error logging; hence, implementations should not assume a workingFDBRecordContext
but might, for example, use it to retrieve a subspace previously resolved against the corresponding database.- Specified by:
toString
in interfaceSubspaceProvider
- Parameters:
context
- record context used to resolve the subspace- Returns:
- CompletableFuture<Subspace>
-
toString
public String toString()
- Specified by:
toString
in interfaceSubspaceProvider
- Overrides:
toString
in classObject
-
-