Interface QueryPerformanceNugget.Factory
- Enclosing class:
- QueryPerformanceNugget
public static interface QueryPerformanceNugget.Factory
-
Method Summary
Modifier and TypeMethodDescriptiondefault QueryPerformanceNuggetcreateForCatchAll(@NotNull QueryPerformanceNugget parentQuery, int operationNumber, @NotNull Consumer<QueryPerformanceNugget> onCloseCallback) Factory method for catch-all nuggets.default QueryPerformanceNuggetcreateForCompilation(@NotNull QueryPerformanceNugget parentQueryOrOperation, int operationNumber, String description, @NotNull Consumer<QueryPerformanceNugget> onCloseCallback) Factory method for compilation-level nuggets.default QueryPerformanceNuggetcreateForOperation(@NotNull QueryPerformanceNugget parentQueryOrOperation, int operationNumber, String description, long inputSize, @NotNull Consumer<QueryPerformanceNugget> onCloseCallback) Factory method for operation-level nuggets.default QueryPerformanceNuggetcreateForQuery(long evaluationNumber, @NotNull String description, @Nullable String sessionId, @NotNull Consumer<QueryPerformanceNugget> onCloseCallback) Factory method for query-level nuggets.default QueryPerformanceNuggetcreateForSubQuery(@NotNull QueryPerformanceNugget parentQuery, long evaluationNumber, @NotNull String description, @NotNull Consumer<QueryPerformanceNugget> onCloseCallback) Factory method for sub-query-level nuggets.
-
Method Details
-
createForQuery
default QueryPerformanceNugget createForQuery(long evaluationNumber, @NotNull @NotNull String description, @Nullable @Nullable String sessionId, @NotNull @NotNull Consumer<QueryPerformanceNugget> onCloseCallback) Factory method for query-level nuggets.- Parameters:
evaluationNumber- A unique identifier for the query evaluation that triggered this nugget creationdescription- The operation descriptionsessionId- The gRPC client session-id if applicableonCloseCallback- A callback that is invoked when the nugget is closed.- Returns:
- A new nugget
-
createForSubQuery
default QueryPerformanceNugget createForSubQuery(@NotNull @NotNull QueryPerformanceNugget parentQuery, long evaluationNumber, @NotNull @NotNull String description, @NotNull @NotNull Consumer<QueryPerformanceNugget> onCloseCallback) Factory method for sub-query-level nuggets.- Parameters:
parentQuery- The parent query nuggetevaluationNumber- A unique identifier for the sub-query evaluation that triggered this nugget creationdescription- The operation descriptiononCloseCallback- A callback that is invoked when the nugget is closed.- Returns:
- A new nugget
-
createForOperation
default QueryPerformanceNugget createForOperation(@NotNull @NotNull QueryPerformanceNugget parentQueryOrOperation, int operationNumber, String description, long inputSize, @NotNull @NotNull Consumer<QueryPerformanceNugget> onCloseCallback) Factory method for operation-level nuggets.- Parameters:
parentQueryOrOperation- The parent query / operation nuggetoperationNumber- A query-unique identifier for the operationdescription- The operation descriptiononCloseCallback- A callback that is invoked when the nugget is closed.- Returns:
- A new nugget
-
createForCompilation
default QueryPerformanceNugget createForCompilation(@NotNull @NotNull QueryPerformanceNugget parentQueryOrOperation, int operationNumber, String description, @NotNull @NotNull Consumer<QueryPerformanceNugget> onCloseCallback) Factory method for compilation-level nuggets.- Parameters:
parentQueryOrOperation- The parent query / operation nuggetoperationNumber- A query-unique identifier for the operationdescription- The compilation descriptiononCloseCallback- A callback that is invoked when the nugget is closed.- Returns:
- A new nugget
-
createForCatchAll
default QueryPerformanceNugget createForCatchAll(@NotNull @NotNull QueryPerformanceNugget parentQuery, int operationNumber, @NotNull @NotNull Consumer<QueryPerformanceNugget> onCloseCallback) Factory method for catch-all nuggets.- Parameters:
parentQuery- The parent query nuggetoperationNumber- A query-unique identifier for the operationonCloseCallback- A callback that is invoked when the nugget is closed.- Returns:
- A new nugget
-