Package markets.alpaca.client.ws
Class AlpacaStreamReconnectPolicy.Builder
java.lang.Object
markets.alpaca.client.ws.AlpacaStreamReconnectPolicy.Builder
- Enclosing class:
- AlpacaStreamReconnectPolicy
Builder for
AlpacaStreamReconnectPolicy.-
Method Summary
Modifier and TypeMethodDescriptionbuild()initialBackoff(Duration initialBackoff) Delay before the first reconnect attempt.jitterRatio(double jitterRatio) Jitter ratio applied to reconnect delays.maxAttempts(int maxAttempts) Maximum number of reconnect attempts.maxBackoff(Duration maxBackoff) Maximum delay between reconnect attempts.
-
Method Details
-
initialBackoff
Delay before the first reconnect attempt. Must be positive. -
maxBackoff
Maximum delay between reconnect attempts. Must be positive. -
maxAttempts
Maximum number of reconnect attempts.Use
0to disable reconnects orAlpacaStreamReconnectPolicy.UNLIMITED_ATTEMPTSto retry forever. -
jitterRatio
Jitter ratio applied to reconnect delays. Use0for deterministic backoff. -
build
-