azure-docs-sdk-java/docs-ref-autogen/com.azure.cosmos.CosmosDiag...

167 строки
16 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.cosmos.CosmosDiagnosticsThresholds"
fullName: "com.azure.cosmos.CosmosDiagnosticsThresholds"
name: "CosmosDiagnosticsThresholds"
nameWithType: "CosmosDiagnosticsThresholds"
summary: "This class describes the thresholds when more details diagnostics are emitted for an operation due to high latency, high RU consumption or high payload sizes."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public final class **CosmosDiagnosticsThresholds**"
constructors:
- uid: "com.azure.cosmos.CosmosDiagnosticsThresholds.CosmosDiagnosticsThresholds()"
fullName: "com.azure.cosmos.CosmosDiagnosticsThresholds.CosmosDiagnosticsThresholds()"
name: "CosmosDiagnosticsThresholds()"
nameWithType: "CosmosDiagnosticsThresholds.CosmosDiagnosticsThresholds()"
summary: "Creates an instance of the Cosmos<wbr>Diagnostics<wbr>Thresholds class with default values"
syntax: "public CosmosDiagnosticsThresholds()"
desc: "Creates an instance of the CosmosDiagnosticsThresholds class with default values"
fields:
- uid: "com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_NON_POINT_OPERATION_LATENCY_THRESHOLD"
fullName: "com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_NON_POINT_OPERATION_LATENCY_THRESHOLD"
name: "DEFAULT_NON_POINT_OPERATION_LATENCY_THRESHOLD"
nameWithType: "CosmosDiagnosticsThresholds.DEFAULT_NON_POINT_OPERATION_LATENCY_THRESHOLD"
summary: "The default latency threshold to determine whether to include request diagnostics or not for non-point operations"
modifiers:
- "static"
- "final"
field:
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public static final Duration DEFAULT_NON_POINT_OPERATION_LATENCY_THRESHOLD"
desc: "The default latency threshold to determine whether to include request diagnostics or not for non-point operations"
- uid: "com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_PAYLOAD_SIZE_THRESHOLD_IN_BYTES"
fullName: "com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_PAYLOAD_SIZE_THRESHOLD_IN_BYTES"
name: "DEFAULT_PAYLOAD_SIZE_THRESHOLD_IN_BYTES"
nameWithType: "CosmosDiagnosticsThresholds.DEFAULT_PAYLOAD_SIZE_THRESHOLD_IN_BYTES"
summary: "The default payload size (in bytes) threshold to determine whether to include request diagnostics or not"
modifiers:
- "static"
- "final"
field:
value: "2147483647"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static final int DEFAULT_PAYLOAD_SIZE_THRESHOLD_IN_BYTES"
desc: "The default payload size (in bytes) threshold to determine whether to include request diagnostics or not"
- uid: "com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_POINT_OPERATION_LATENCY_THRESHOLD"
fullName: "com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_POINT_OPERATION_LATENCY_THRESHOLD"
name: "DEFAULT_POINT_OPERATION_LATENCY_THRESHOLD"
nameWithType: "CosmosDiagnosticsThresholds.DEFAULT_POINT_OPERATION_LATENCY_THRESHOLD"
summary: "The default latency threshold to determine whether to include request diagnostics or not for point operations"
modifiers:
- "static"
- "final"
field:
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public static final Duration DEFAULT_POINT_OPERATION_LATENCY_THRESHOLD"
desc: "The default latency threshold to determine whether to include request diagnostics or not for point operations"
- uid: "com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_REQUEST_CHARGE_THRESHOLD"
fullName: "com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_REQUEST_CHARGE_THRESHOLD"
name: "DEFAULT_REQUEST_CHARGE_THRESHOLD"
nameWithType: "CosmosDiagnosticsThresholds.DEFAULT_REQUEST_CHARGE_THRESHOLD"
summary: "The default request charge (RU) threshold to determine whether to include request diagnostics or not"
modifiers:
- "static"
- "final"
field:
value: "1000.0"
type: "<xref href=\"float?alt=float&text=float\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static final float DEFAULT_REQUEST_CHARGE_THRESHOLD"
desc: "The default request charge (RU) threshold to determine whether to include request diagnostics or not"
methods:
- uid: "com.azure.cosmos.CosmosDiagnosticsThresholds.setFailureHandler(java.util.function.BiPredicate<java.lang.Integer,java.lang.Integer>)"
fullName: "com.azure.cosmos.CosmosDiagnosticsThresholds.setFailureHandler(BiPredicate<Integer,Integer> failureHandler)"
name: "setFailureHandler(BiPredicate<Integer,Integer> failureHandler)"
nameWithType: "CosmosDiagnosticsThresholds.setFailureHandler(BiPredicate<Integer,Integer> failureHandler)"
summary: "Can be used to customize the logic determining whether the outcome of an operation (based on status<wbr>Code + sub<wbr>Status<wbr>Code) is considered a failure (and diagnostics will be emitted) or not."
parameters:
- description: "the function that will be used to determine whether a status code/sub-status code\n tuple should be considered a failure."
name: "failureHandler"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/BiPredicate.html\">BiPredicate</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html\">Integer</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html\">Integer</a>&gt;"
syntax: "public CosmosDiagnosticsThresholds setFailureHandler(BiPredicate<Integer,Integer> failureHandler)"
desc: "Can be used to customize the logic determining whether the outcome of an operation (based on statusCode + subStatusCode) is considered a failure (and diagnostics will be emitted) or not. By default, all status codes >= 400 except for (404/0 - item not found, 409/0 - conflict, document with same id+pk already exists, 412/0 - (etag) pre-condition failure and 429/3200 - throttling due to provisioned RU exceeded) are considered failures. Those exceptions can happen very frequently and are usually expected under certain circumstances by applications - so, the noise-level for emitting diagnostics would be too high. The first parameter will be the status code - the second parameter the subStatusCode. The returned boolean of the function would indicate whether the operation should be considered as failure form a diagnostics perspective."
returns:
description: "current CosmosDiagnosticsThresholds instance"
type: "<xref href=\"com.azure.cosmos.CosmosDiagnosticsThresholds?alt=com.azure.cosmos.CosmosDiagnosticsThresholds&text=CosmosDiagnosticsThresholds\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDiagnosticsThresholds.setNonPointOperationLatencyThreshold(java.time.Duration)"
fullName: "com.azure.cosmos.CosmosDiagnosticsThresholds.setNonPointOperationLatencyThreshold(Duration nonPointOperationLatencyThreshold)"
name: "setNonPointOperationLatencyThreshold(Duration nonPointOperationLatencyThreshold)"
nameWithType: "CosmosDiagnosticsThresholds.setNonPointOperationLatencyThreshold(Duration nonPointOperationLatencyThreshold)"
summary: "Can be used to define custom latency thresholds."
parameters:
- description: "the latency threshold for all operations except (ReadItem, CreateItem,\n UpsertItem, ReplaceItem, PatchItem or DeleteItem)"
name: "nonPointOperationLatencyThreshold"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public CosmosDiagnosticsThresholds setNonPointOperationLatencyThreshold(Duration nonPointOperationLatencyThreshold)"
desc: "Can be used to define custom latency thresholds. When the latency threshold is exceeded more detailed diagnostics will be emitted (including the request diagnostics). There is some overhead of emitting the more detailed diagnostics - so recommendation is to choose latency thresholds that reduce the noise level and only emit detailed diagnostics when there is really business impact seen. The default value for the point operation latency threshold is <xref uid=\"com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_POINT_OPERATION_LATENCY_THRESHOLD\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDiagnosticsThresholds#DEFAULT_POINT_OPERATION_LATENCY_THRESHOLD\"></xref>, for non-point operations <xref uid=\"com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_NON_POINT_OPERATION_LATENCY_THRESHOLD\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDiagnosticsThresholds#DEFAULT_NON_POINT_OPERATION_LATENCY_THRESHOLD\"></xref>."
returns:
description: "current CosmosDiagnosticsThresholds instance"
type: "<xref href=\"com.azure.cosmos.CosmosDiagnosticsThresholds?alt=com.azure.cosmos.CosmosDiagnosticsThresholds&text=CosmosDiagnosticsThresholds\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDiagnosticsThresholds.setPayloadSizeThreshold(int)"
fullName: "com.azure.cosmos.CosmosDiagnosticsThresholds.setPayloadSizeThreshold(int bytes)"
name: "setPayloadSizeThreshold(int bytes)"
nameWithType: "CosmosDiagnosticsThresholds.setPayloadSizeThreshold(int bytes)"
summary: "Can be used to define a payload size threshold."
parameters:
- description: "the threshold for the payload size in bytes"
name: "bytes"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosDiagnosticsThresholds setPayloadSizeThreshold(int bytes)"
desc: "Can be used to define a payload size threshold. When the threshold is exceeded for either request or response payloads more detailed diagnostics will be emitted (including the request diagnostics). There is some overhead of emitting the more detailed diagnostics - so recommendation is to choose a payload size threshold that reduces the noise level and only emits detailed diagnostics when the payload size is significantly higher than expected. The default value for the payload size threshold are <xref uid=\"com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_PAYLOAD_SIZE_THRESHOLD_IN_BYTES\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDiagnosticsThresholds#DEFAULT_PAYLOAD_SIZE_THRESHOLD_IN_BYTES\"></xref> bytes."
returns:
description: "current CosmosDiagnosticsThresholds instance"
type: "<xref href=\"com.azure.cosmos.CosmosDiagnosticsThresholds?alt=com.azure.cosmos.CosmosDiagnosticsThresholds&text=CosmosDiagnosticsThresholds\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDiagnosticsThresholds.setPointOperationLatencyThreshold(java.time.Duration)"
fullName: "com.azure.cosmos.CosmosDiagnosticsThresholds.setPointOperationLatencyThreshold(Duration pointOperationLatencyThreshold)"
name: "setPointOperationLatencyThreshold(Duration pointOperationLatencyThreshold)"
nameWithType: "CosmosDiagnosticsThresholds.setPointOperationLatencyThreshold(Duration pointOperationLatencyThreshold)"
summary: "Can be used to define custom latency thresholds."
parameters:
- description: "the latency threshold for point operations (ReadItem, CreateItem,\n UpsertItem, ReplaceItem, PatchItem or DeleteItem)"
name: "pointOperationLatencyThreshold"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public CosmosDiagnosticsThresholds setPointOperationLatencyThreshold(Duration pointOperationLatencyThreshold)"
desc: "Can be used to define custom latency thresholds. When the latency threshold is exceeded more detailed diagnostics will be emitted (including the request diagnostics). There is some overhead of emitting the more detailed diagnostics - so recommendation is to choose latency thresholds that reduce the noise level and only emit detailed diagnostics when there is really business impact seen. The default value for the point operation latency threshold is <xref uid=\"com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_POINT_OPERATION_LATENCY_THRESHOLD\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDiagnosticsThresholds#DEFAULT_POINT_OPERATION_LATENCY_THRESHOLD\"></xref>, for non-point operations <xref uid=\"com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_NON_POINT_OPERATION_LATENCY_THRESHOLD\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDiagnosticsThresholds#DEFAULT_NON_POINT_OPERATION_LATENCY_THRESHOLD\"></xref>."
returns:
description: "current CosmosDiagnosticsThresholds instance"
type: "<xref href=\"com.azure.cosmos.CosmosDiagnosticsThresholds?alt=com.azure.cosmos.CosmosDiagnosticsThresholds&text=CosmosDiagnosticsThresholds\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDiagnosticsThresholds.setRequestChargeThreshold(float)"
fullName: "com.azure.cosmos.CosmosDiagnosticsThresholds.setRequestChargeThreshold(float requestChargeThreshold)"
name: "setRequestChargeThreshold(float requestChargeThreshold)"
nameWithType: "CosmosDiagnosticsThresholds.setRequestChargeThreshold(float requestChargeThreshold)"
summary: "Can be used to define a custom RU (request charge) threshold."
parameters:
- description: "The total request charge threshold for an operation. When this threshold is\n exceeded for an operation the corresponding detailed diagnostics will be emitted."
name: "requestChargeThreshold"
type: "<xref href=\"float?alt=float&text=float\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosDiagnosticsThresholds setRequestChargeThreshold(float requestChargeThreshold)"
desc: "Can be used to define a custom RU (request charge) threshold. When the threshold is exceeded more detailed diagnostics will be emitted (including the request diagnostics). There is some overhead of emitting the more detailed diagnostics - so recommendation is to choose a request charge threshold that reduces the noise level and only emits detailed diagnostics when the request charge is significantly higher thane expected. The default value for the request charge threshold are <xref uid=\"com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_REQUEST_CHARGE_THRESHOLD\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDiagnosticsThresholds#DEFAULT_REQUEST_CHARGE_THRESHOLD\"></xref> RUs."
returns:
description: "current CosmosDiagnosticsThresholds instance"
type: "<xref href=\"com.azure.cosmos.CosmosDiagnosticsThresholds?alt=com.azure.cosmos.CosmosDiagnosticsThresholds&text=CosmosDiagnosticsThresholds\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDiagnosticsThresholds.toString()"
fullName: "com.azure.cosmos.CosmosDiagnosticsThresholds.toString()"
name: "toString()"
nameWithType: "CosmosDiagnosticsThresholds.toString()"
overridden: "java.lang.Object.toString()"
syntax: "public String toString()"
returns:
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
type: "class"
desc: "This class describes the thresholds when more details diagnostics are emitted for an operation due to high latency, high RU consumption or high payload sizes."
metadata: {}
package: "com.azure.cosmos"
artifact: com.azure:azure-cosmos:4.63.3