@RequestScoped public class TimeoutClient extends Object
Constructor and Description |
---|
TimeoutClient() |
Modifier and Type | Method and Description |
---|---|
Connection |
serviceA(long timeToSleep)
serviceA uses the default Fault Tolerance timeout of 1 second.
|
Connection |
serviceB(long timeToSleep)
serviceB specifies a Timeout longer than the default, at 2 seconds
|
Connection |
serviceC(long timeToSleep)
serviceC specifies a Timeout shorter than the default, at .5 seconds
|
Connection |
serviceD(long timeToSleepInMillis)
serviceD specifies a Timeout longer than the default, at 2
seconds.
|
@Timeout public Connection serviceA(long timeToSleep)
timeToSleep
- How long should the execution take in millis@Timeout(value=2000L) public Connection serviceB(long timeToSleep)
timeToSleep
- How long should the execution take in millis@Timeout(value=500L) public Connection serviceC(long timeToSleep)
timeToSleep
- How long should the execution take in millis@Timeout(value=2L, unit=SECONDS) public Connection serviceD(long timeToSleepInMillis)
timeToSleepInMillis
- How long should the execution take in millisCopyright © 2020 Eclipse Foundation. All rights reserved.