com.microsoft.azure.sdk.iot.device.transport.NoRetry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iot-device-client Show documentation
Show all versions of iot-device-client Show documentation
The Microsoft Azure IoT Device SDK for Java
/*
*
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*
*/
package com.microsoft.azure.sdk.iot.device.transport;
import lombok.extern.slf4j.Slf4j;
/**
* Represents a retry policy that performs no retries.
*/
@Slf4j
public class NoRetry implements RetryPolicy
{
public NoRetry()
{
log.info("NOTE: A new instance of NoRetry has been created, the client will not perform any retries on disconnect.");
}
/**
* Always says to not retry.
*
* @param currentRetryCount the number of retries for the given operation
* @param lastException the last exception encountered
* @return the retry decision.
*/
public RetryDecision getRetryDecision(int currentRetryCount, TransportException lastException)
{
return new RetryDecision(false, 0);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy