Class DefaultTimeoutService
java.lang.Object
de.hybris.platform.integrationservices.util.timeout.impl.DefaultTimeoutService
- All Implemented Interfaces:
TimeoutService
Default implementation of the
TimeoutService-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DefaultTimeoutService
public DefaultTimeoutService()
-
-
Method Details
-
execute
Executes theCallableand wait until the timeout period expires. When the timeout occurred the implementation may decide to return a value indicating so, or an exception is thrown. A timeout value less than 1 ms will timeout immediately, and anIntegrationTimeoutExceptionwill be thrown.- Specified by:
executein interfaceTimeoutService- Type Parameters:
V- The type of the return value from the Callable- Parameters:
callable- The logic to executetimeout- The period to wait for the execution to complete. Negative value should result in anIntegrationTimeoutException. The implementation can decide what to do with 0. It can throw an IntegrationTimeoutException, or equate 0 to wait indefinitely.- Returns:
- The value returned from the Callable
-