azure-docs-sdk-java/legacy/docs-ref-autogen/com.microsoft.azure.service...

172 строки
13 KiB
YAML

### YamlMime:JavaType
uid: "com.microsoft.azure.servicebus.primitives.RetryPolicy"
fullName: "com.microsoft.azure.servicebus.primitives.RetryPolicy"
name: "RetryPolicy"
nameWithType: "RetryPolicy"
summary: "Represents an abstraction of a policy for retrying messaging operations when an exception is encountered."
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 abstract class **RetryPolicy**"
constructors:
- uid: "com.microsoft.azure.servicebus.primitives.RetryPolicy.RetryPolicy(java.lang.String)"
fullName: "com.microsoft.azure.servicebus.primitives.RetryPolicy.RetryPolicy(String name)"
name: "RetryPolicy(String name)"
nameWithType: "RetryPolicy.RetryPolicy(String name)"
summary: "Creates an instance of Retry<wbr>Policy with the given name."
modifiers:
- "protected"
parameters:
- description: "name of the policy"
name: "name"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "protected RetryPolicy(String name)"
desc: "Creates an instance of RetryPolicy with the given name."
methods:
- uid: "com.microsoft.azure.servicebus.primitives.RetryPolicy.getDefault()"
fullName: "com.microsoft.azure.servicebus.primitives.RetryPolicy.getDefault()"
name: "getDefault()"
nameWithType: "RetryPolicy.getDefault()"
summary: "Retry policy that provides exponentially increasing retry intervals with each successive failure."
modifiers:
- "static"
syntax: "public static RetryPolicy getDefault()"
desc: "Retry policy that provides exponentially increasing retry intervals with each successive failure. This policy is suitable for use by use most client applications and is also the default policy if no retry policy is specified."
returns:
description: "a retry policy that provides exponentially increasing retry intervals"
type: "<xref href=\"com.microsoft.azure.servicebus.primitives.RetryPolicy?alt=com.microsoft.azure.servicebus.primitives.RetryPolicy&text=RetryPolicy\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.servicebus.primitives.RetryPolicy.getNextRetryInterval(java.lang.String,java.lang.Exception,java.time.Duration)"
fullName: "com.microsoft.azure.servicebus.primitives.RetryPolicy.getNextRetryInterval(String clientId, Exception lastException, Duration remainingTime)"
name: "getNextRetryInterval(String clientId, Exception lastException, Duration remainingTime)"
nameWithType: "RetryPolicy.getNextRetryInterval(String clientId, Exception lastException, Duration remainingTime)"
summary: "Gets the interval after which next<wbr>Retry should be attempted, based on the last exception encountered and the remaining time before the operation times out."
parameters:
- description: "id of the sender or receiver or client object that encountered the exception."
name: "clientId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "last exception encountered"
name: "lastException"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html\">Exception</a>"
- description: "remainingTime to retry before the operation times out"
name: "remainingTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public Duration getNextRetryInterval(String clientId, Exception lastException, Duration remainingTime)"
desc: "Gets the interval after which nextRetry should be attempted, based on the last exception encountered and the remaining time before the operation times out."
returns:
description: "duration after which the operation will be retried. Returns null when the operation should not retried."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- uid: "com.microsoft.azure.servicebus.primitives.RetryPolicy.getNoRetry()"
fullName: "com.microsoft.azure.servicebus.primitives.RetryPolicy.getNoRetry()"
name: "getNoRetry()"
nameWithType: "RetryPolicy.getNoRetry()"
summary: "Gets a retry policy that doesn't retry any operations, effectively disabling retries."
modifiers:
- "static"
syntax: "public static RetryPolicy getNoRetry()"
desc: "Gets a retry policy that doesn't retry any operations, effectively disabling retries. Clients can use this retry policy in case they do not want any operation automatically retried."
returns:
description: "a retry policy that doesn't retry any operations"
type: "<xref href=\"com.microsoft.azure.servicebus.primitives.RetryPolicy?alt=com.microsoft.azure.servicebus.primitives.RetryPolicy&text=RetryPolicy\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.servicebus.primitives.RetryPolicy.getRetryCount(java.lang.String)"
fullName: "com.microsoft.azure.servicebus.primitives.RetryPolicy.getRetryCount(String clientId)"
name: "getRetryCount(String clientId)"
nameWithType: "RetryPolicy.getRetryCount(String clientId)"
modifiers:
- "protected"
parameters:
- name: "clientId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "protected int getRetryCount(String clientId)"
returns:
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.servicebus.primitives.RetryPolicy.incrementRetryCount(java.lang.String)"
fullName: "com.microsoft.azure.servicebus.primitives.RetryPolicy.incrementRetryCount(String clientId)"
name: "incrementRetryCount(String clientId)"
nameWithType: "RetryPolicy.incrementRetryCount(String clientId)"
summary: "Increments the number of successive retry attempts made by a client."
parameters:
- description: "id of the client retrying a failed operation"
name: "clientId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public void incrementRetryCount(String clientId)"
desc: "Increments the number of successive retry attempts made by a client."
- uid: "com.microsoft.azure.servicebus.primitives.RetryPolicy.isRetryableException(java.lang.Exception)"
fullName: "com.microsoft.azure.servicebus.primitives.RetryPolicy.isRetryableException(Exception exception)"
name: "isRetryableException(Exception exception)"
nameWithType: "RetryPolicy.isRetryableException(Exception exception)"
summary: "Determines if an exception is retry-able or not."
modifiers:
- "static"
parameters:
- description: "exception encountered by an operation, to be determined if it is retry-able."
name: "exception"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html\">Exception</a>"
syntax: "public static boolean isRetryableException(Exception exception)"
desc: "Determines if an exception is retry-able or not. Only transient exceptions should be retried."
returns:
description: "true if the exception is retry-able (like ServerBusy or other transient exception), else returns false"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.servicebus.primitives.RetryPolicy.onGetNextRetryInterval(java.lang.String,java.lang.Exception,java.time.Duration,int)"
fullName: "com.microsoft.azure.servicebus.primitives.RetryPolicy.onGetNextRetryInterval(String clientId, Exception lastException, Duration remainingTime, int baseWaitTime)"
name: "onGetNextRetryInterval(String clientId, Exception lastException, Duration remainingTime, int baseWaitTime)"
nameWithType: "RetryPolicy.onGetNextRetryInterval(String clientId, Exception lastException, Duration remainingTime, int baseWaitTime)"
summary: "Adjusts the interval after which next<wbr>Retry should be attempted, based on the last exception encountered, the remaining time before the operation times out and the minimum wait time before retry."
modifiers:
- "protected"
- "abstract"
parameters:
- description: "id of the sender or receiver or client object that encountered the exception."
name: "clientId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "last exception encountered"
name: "lastException"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html\">Exception</a>"
- description: "remainingTime to retry before the operation times out"
name: "remainingTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "minimum wait time determined by the base retry policy. Overriding methods can return a different value."
name: "baseWaitTime"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected abstract Duration onGetNextRetryInterval(String clientId, Exception lastException, Duration remainingTime, int baseWaitTime)"
desc: "Adjusts the interval after which nextRetry should be attempted, based on the last exception encountered, the remaining time before the operation times out and the minimum wait time before retry. Clients can override this method to specify a wait time based on the exception encountered."
returns:
description: "duration after which the operation will be retried. Returns null when the operation should not retried"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- uid: "com.microsoft.azure.servicebus.primitives.RetryPolicy.resetRetryCount(java.lang.String)"
fullName: "com.microsoft.azure.servicebus.primitives.RetryPolicy.resetRetryCount(String clientId)"
name: "resetRetryCount(String clientId)"
nameWithType: "RetryPolicy.resetRetryCount(String clientId)"
summary: "Resets the number of retry attempts made by a client."
parameters:
- description: "id of the client that just retried a failed operation and succeeded."
name: "clientId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public void resetRetryCount(String clientId)"
desc: "Resets the number of retry attempts made by a client. This method is called by the client when retried operation succeeds."
- uid: "com.microsoft.azure.servicebus.primitives.RetryPolicy.toString()"
fullName: "com.microsoft.azure.servicebus.primitives.RetryPolicy.toString()"
name: "toString()"
nameWithType: "RetryPolicy.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: "Represents an abstraction of a policy for retrying messaging operations when an exception is encountered. Some exceptions encountered by a sender or receiver can be transient like ServerBusy and the operation will succeed if retried. Clients can specify a retry policy using <xref uid=\"com.microsoft.azure.servicebus.primitives.ConnectionStringBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ConnectionStringBuilder\"></xref> which guides senders and receivers to automatically retry the failed operation before throwing the exception to the client application. Users should not implement this class, instead should use one of the provided implementations through <xref uid=\"com.microsoft.azure.servicebus.primitives.RetryPolicy.getDefault*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#getDefault\"></xref> or <xref uid=\"com.microsoft.azure.servicebus.primitives.RetryPolicy.getNoRetry*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#getNoRetry\"></xref>."
metadata: {}
package: "com.microsoft.azure.servicebus.primitives"
artifact: com.microsoft.azure:azure-servicebus:3.6.7