Class DelayedNetworkService<T>
java.lang.Object
fr.paris.lutece.plugins.identitystore.service.network.DelayedNetworkService<T>
- Type Parameters:
T- the return type of the response to be handled
This generic class is a retry pattern aimed to call method that could fail or need to be slow down.
Properties:
Properties:
- Default max retries is set to 500 but can be overridden by the user through identitystore.network.retry.max property.
- Default delay is set to 10ms but can be overridden by the user through identitystore.network.delay property. This delay is always used in retries
- Default delay activated is set to false but can be overridden by the user through identitystore.network.delay.activated property. When set to true, the delay is applied after each call.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncall(NetworkSupplier<T> method, String serviceName) call(NetworkSupplier<T> method, String serviceName, LoggingTask logger) int
-
Constructor Details
-
DelayedNetworkService
public DelayedNetworkService()
-
-
Method Details
-
call
public T call(NetworkSupplier<T> method, String serviceName) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException - Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
call
public T call(NetworkSupplier<T> method, String serviceName, LoggingTask logger) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException - Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
getNbRetry
public int getNbRetry()
-