Package com.apple.foundationdb.record
This layer is a record-oriented database based on Protocol Buffers.
Record instances are Protobuf Message
s stored in the FoundationDB key-value store.
Highlights
Record data is mediated by a RecordMetaData
, which defines RecordType
s and their transactionally-consistent secondary Index
es.
All interaction with the database is performed inside a transaction, represented by an FDBRecordContext
.
An FDBRecordStore
represents a specific contiguous Subspace
of the key-value store used to store records for a specific meta-data.
Records can be retrieved directly from the record store by primary key. Or they can be gotten as the result of queries.
A RecordQuery
represents a logical query.
A RecordQueryPlanner
transforms a logical query into an executable RecordQueryPlan
, which can be run against a record store
to give a RecordCursor
of records.
The same meta-data can be used to describe multiple record stores.
To organize the placement of these record stores in separate key-value ranges according to hierarchical parameters, a KeySpace
is used.
All database operations are instrumented by a StoreTimer
, which can be hooked up to whatever logging and monitoring system a client uses.
-
Interface Summary Interface Description ByteScanLimiter Track the number of bytes scanned up to some limit, after which record scans should not be allowed.PlanHashable A more stable version ofObject.hashCode()
.QueryHashable Query hash - calculate and return identifying hash values for queries.RecordCursor<T> An asynchronous iterator that supports continuations.RecordCursorContinuation An interface for types that represent the continuation of aRecordCursor
.RecordCursorVisitor A hierarchical visitor for record cursor trees designed mostly to allow tests to gather information without adding invasive query methods to theRecordCursor
interface.RecordMetaDataProvider A source ofRecordMetaData
.RecordScanLimiter Track number of records scanned up to some limit, after which record scans should not be allowed. -
Class Summary Class Description AsyncLoadingCache<K,V> A cache for retaining the result of some asynchronous operation up until some expiration time.Bindings A map of bound parameter values passed to query evaluation.Bindings.Builder A builder forBindings
.ByteArrayContinuation A shim to wrap old-style byte array continuations.ByteScanLimiterFactory A factory that produces implementations ofByteScanLimiter
s.EvaluationContext A context for query evaluation.EvaluationContextBuilder A builder forEvaluationContext
.ExecuteProperties Limits on the execution of a query.ExecuteProperties.Builder A builder forExecuteProperties
.ExecuteState An encapsulation of the mutable state of query or scan execution.FunctionNames Names of core-supported query functions.IndexEntry AnIndexEntry
carries around the key and value read from an index (as the name would imply).IndexScanType The way in which an index should be scanned.KeyRange A range within a subspace specified by two byte value endpoints.MutableRecordStoreState A record store that can be modified to reflect changes made to the database.ObjectPlanHash This class implements a planHash for the member classes of the query plan.PipelineOperation Kind of asynchronous pipelined operation being performed.RecordCursorEndContinuation A concrete continuation representing that aRecordCursor
has returned all of the records that it ever will.RecordCursorIterator<T> An asynchronous iterator that wraps aRecordCursor
and presents an iterator-style interface for advancing the cursor.RecordCursorResult<T> A result obtained when aRecordCursor
advances.RecordCursorStartContinuation A continuation representing the start of a cursor's execution.RecordFunction<T> A function to be applied to a record as part of query execution.RecordMetaData Meta-data for Record Layer record stores.RecordMetaDataBuilder A builder forRecordMetaData
.RecordScanLimiterFactory A factory that produces implementations ofRecordScanLimiter
s.RecordStoreState TheRecordStoreState
interface handles information that might differ between otherwise identical record stores.ScanProperties A group of properties that pertain to a single scan.TimeScanLimiter Track time remaining until a given time limit, after which record scans should not be allowed.TupleRange A range within a subspace specified by twoTuple
endpoints.ValueRange<T> A range defines the boundaries around a contiguous span of values of some type. -
Enum Summary Enum Description Bindings.Internal Bindings slots used internally by plan operators.CursorStreamingMode The streaming mode to use when openingRecordCursor
s.EndpointType The type of one of the endpoints of aTupleRange
.IndexState Different states an index might be in within a given store.IsolationLevel The isolation level for reads from the database.PlanHashable.PlanHashKind The "kinds" of planHash calculations.QueryHashable.QueryHashKind The "kinds" of queryHash calculations.RecordCursor.NoNextReason The reason thatRecordCursor.hasNext()
returnedfalse
. -
Exception Summary Exception Description AggregateFunctionNotSupportedException Exception thrown when an aggregate function is not supported.LoggableTimeoutException Subclass of TimeoutException with support for adding logging info in the form of keys and values.RecordCoreArgumentException Functional equivalent ofIllegalArgumentException
.RecordCoreException An exception thrown by the core of the Record Layer.RecordCoreInterruptedException Functional equivalent ofInterruptedException
.RecordCoreRetriableTransactionException An exception from transaction processing that ought to be retried.RecordCoreStorageException Exceptions due to problems with the state of or connection to a particular record store.RecordCursorResult.IllegalResultNoNextReasonAccessException An exception thrown whenRecordCursorResult.getNoNextReason()
is called on a result that has a next value.RecordCursorResult.IllegalResultValueAccessException An exception thrown whenRecordCursorResult.get()
is called on a result without a next value.RecordIndexUniquenessViolation An exception thrown when there is an attempt to store a duplicate value in a unique index.RecordMetaDataBuilder.MetaDataProtoDeserializationException Exception thrown when meta-data cannot be loaded from serialized form.ScanLimitReachedException Exception thrown when a transaction tries to scan more than the allowed number of key-value pairs.TupleRange.ByteStringBoundException Exception thrown when range endpoint is not consistent withCONTINUATION
endpoint type.