@API(value=STABLE) public interface QueryComponent extends PlanHashable, PlannerExpression
validate(Descriptors.Descriptor)
must be called before calling eval(FDBRecordStoreBase, EvaluationContext, FDBRecord)
, or bad
things may happen.Modifier and Type | Method and Description |
---|---|
default <M extends Message> |
eval(FDBRecordStoreBase<M> store,
EvaluationContext context,
FDBRecord<M> record)
Return whether or not the given record matches this component.
|
default <M extends Message> |
evalAsync(FDBRecordStoreBase<M> store,
EvaluationContext context,
FDBRecord<M> record)
Asynchronous version of
eval . |
<M extends Message> |
evalMessage(FDBRecordStoreBase<M> store,
EvaluationContext context,
FDBRecord<M> record,
Message message)
Return whether or not the given record matches this component.
|
default <M extends Message> |
evalMessageAsync(FDBRecordStoreBase<M> store,
EvaluationContext context,
FDBRecord<M> record,
Message message)
Asynchronous version of
evalMessage . |
default boolean |
isAsync()
Get whether this component is asynchronous.
|
void |
validate(Descriptors.Descriptor descriptor)
Validate that the given descriptor is consistent with this component.
|
iterablePlanHash, objectPlanHash, objectsPlanHash, planHash, planHash, planHash
acceptPropertyVisitor, bindTo, getPlannerExpressionChildren
@Nullable default <M extends Message> Boolean eval(@Nonnull FDBRecordStoreBase<M> store, @Nonnull EvaluationContext context, @Nullable FDBRecord<M> record)
evalMessage(com.apple.foundationdb.record.provider.foundationdb.FDBRecordStoreBase<M>, com.apple.foundationdb.record.EvaluationContext, com.apple.foundationdb.record.provider.foundationdb.FDBRecord<M>, com.google.protobuf.Message)
instead of this one, even if they do not deal with
Protobuf messages, so that they interact properly with expressions that do.M
- the type of recordsstore
- the record store from which the record camecontext
- context against which evaluation takes placerecord
- a record of the appropriate record type for this component@Nullable <M extends Message> Boolean evalMessage(@Nonnull FDBRecordStoreBase<M> store, @Nonnull EvaluationContext context, @Nullable FDBRecord<M> record, @Nullable Message message)
evalMessage
.
Under ordinary circumstances, if record
is null
, then message
will be null
.
Otherwise, message
will be record.getRecord()
or some submessage of that, possibly null
if
the corresponding field is missing.M
- the type of recordstore
- the record store from which the record camecontext
- context for bound expressionsrecord
- the recordmessage
- the Protobuf message to evaluate againsteval(com.apple.foundationdb.record.provider.foundationdb.FDBRecordStoreBase<M>, com.apple.foundationdb.record.EvaluationContext, com.apple.foundationdb.record.provider.foundationdb.FDBRecord<M>)
@Nonnull default <M extends Message> CompletableFuture<Boolean> evalAsync(@Nonnull FDBRecordStoreBase<M> store, @Nonnull EvaluationContext context, @Nullable FDBRecord<M> record)
eval
.M
- the type of recordsstore
- the record store from which the record camecontext
- context against which evaluation takes placerecord
- a record of the appropriate record type for this componenteval(com.apple.foundationdb.record.provider.foundationdb.FDBRecordStoreBase<M>, com.apple.foundationdb.record.EvaluationContext, com.apple.foundationdb.record.provider.foundationdb.FDBRecord<M>)
@Nonnull default <M extends Message> CompletableFuture<Boolean> evalMessageAsync(@Nonnull FDBRecordStoreBase<M> store, @Nonnull EvaluationContext context, @Nullable FDBRecord<M> record, @Nullable Message message)
evalMessage
.M
- the type of recordstore
- the record store from which the record camecontext
- context for bound expressionsrecord
- the recordmessage
- the Protobuf message to evaluate againsteval(com.apple.foundationdb.record.provider.foundationdb.FDBRecordStoreBase<M>, com.apple.foundationdb.record.EvaluationContext, com.apple.foundationdb.record.provider.foundationdb.FDBRecord<M>)
default boolean isAsync()
true
if this component is better executed asynchronouslyvoid validate(@Nonnull Descriptors.Descriptor descriptor)
descriptor
- a record type descriptor, or a submessage descriptorQuery.InvalidExpressionException
- if the descriptor is not consistent with this component