io.synadia.jnats.extension.RetryObserver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of retrier Show documentation
Show all versions of retrier Show documentation
Synadia Communications Inc. Retrier Utility
// Copyright (c) 2024 Synadia Communications Inc. All Rights Reserved.
// See LICENSE and NOTICE file for details.
package io.synadia.jnats.extension;
/**
* The RetryObserver gives an opportunity to inspect an exception
* and optionally stop retries before the retry config is exhausted
*/
public interface RetryObserver {
/**
* Inspect the exception to determine if the execute should retry.
* @param e the exception that occurred when executing the action.
* @return true if the execution should retry (assuming that the retry config is not exhausted)
*/
boolean shouldRetry(Exception e);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy