@PublicApi public class NoOpInstrumentation extends java.lang.Object implements Instrumentation
Instrumentation
that does nothing. It can be used
as a base for derived classes where you only implement the methods you want toModifier and Type | Class and Description |
---|---|
static class |
NoOpInstrumentation.NoOpInstrumentationContext<T> |
Modifier and Type | Field and Description |
---|---|
static NoOpInstrumentation |
INSTANCE
A singleton instance of a
Instrumentation that does nothing |
Constructor and Description |
---|
NoOpInstrumentation() |
Modifier and Type | Method and Description |
---|---|
InstrumentationContext<ExecutionResult> |
beginDataFetch(InstrumentationDataFetchParameters parameters)
This is called just before the data fetch is started and when this step finishes the
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
InstrumentationContext<ExecutionResult> |
beginExecution(InstrumentationExecutionParameters parameters)
This is called just before a query is executed and when this step finishes the
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
InstrumentationContext<java.util.concurrent.CompletableFuture<ExecutionResult>> |
beginExecutionStrategy(InstrumentationExecutionStrategyParameters parameters)
This is called each time the
ExecutionStrategy is invoked and when the
CompletableFuture has been dispatched for the query fields the
InstrumentationContext.onEnd(Object, Throwable)
is called. |
InstrumentationContext<ExecutionResult> |
beginField(InstrumentationFieldParameters parameters)
This is called just before a field is resolved and when this step finishes the
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
InstrumentationContext<java.lang.Object> |
beginFieldFetch(InstrumentationFieldFetchParameters parameters)
This is called just before a field
DataFetcher is invoked and when this step finishes the InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
InstrumentationContext<Document> |
beginParse(InstrumentationExecutionParameters parameters)
This is called just before a query is parsed and when this step finishes the
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
InstrumentationContext<java.util.List<ValidationError>> |
beginValidation(InstrumentationValidationParameters parameters)
This is called just before the parsed query Document is validated and when this step finishes the
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createState, instrumentDataFetcher, instrumentExecutionResult
public static final NoOpInstrumentation INSTANCE
Instrumentation
that does nothingpublic InstrumentationContext<ExecutionResult> beginExecution(InstrumentationExecutionParameters parameters)
Instrumentation
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginExecution
in interface Instrumentation
parameters
- the parameters to this stepInstrumentationContext
object that will be called back when the step endspublic InstrumentationContext<Document> beginParse(InstrumentationExecutionParameters parameters)
Instrumentation
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginParse
in interface Instrumentation
parameters
- the parameters to this stepInstrumentationContext
object that will be called back when the step endspublic InstrumentationContext<java.util.List<ValidationError>> beginValidation(InstrumentationValidationParameters parameters)
Instrumentation
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginValidation
in interface Instrumentation
parameters
- the parameters to this stepInstrumentationContext
object that will be called back when the step endspublic InstrumentationContext<java.util.concurrent.CompletableFuture<ExecutionResult>> beginExecutionStrategy(InstrumentationExecutionStrategyParameters parameters)
Instrumentation
ExecutionStrategy
is invoked and when the
CompletableFuture
has been dispatched for the query fields the
InstrumentationContext.onEnd(Object, Throwable)
is called.
Note because the execution strategy execution is asynchronous, the query data is not guaranteed to be
completed when this step finishes. It is however a chance to dispatch side effects that might cause
asynchronous data fetching code to actually run or attach CompletableFuture handlers onto the result
via Instrumentation.beginExecutionStrategy
in interface Instrumentation
parameters
- the parameters to this stepInstrumentationContext
object that will be called back when the step endspublic InstrumentationContext<ExecutionResult> beginDataFetch(InstrumentationDataFetchParameters parameters)
Instrumentation
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginDataFetch
in interface Instrumentation
parameters
- the parameters to this stepInstrumentationContext
object that will be called back when the step endspublic InstrumentationContext<ExecutionResult> beginField(InstrumentationFieldParameters parameters)
Instrumentation
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginField
in interface Instrumentation
parameters
- the parameters to this stepInstrumentationContext
object that will be called back when the step endspublic InstrumentationContext<java.lang.Object> beginFieldFetch(InstrumentationFieldFetchParameters parameters)
Instrumentation
DataFetcher
is invoked and when this step finishes the InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginFieldFetch
in interface Instrumentation
parameters
- the parameters to this stepInstrumentationContext
object that will be called back when the step ends