Package io.modelcontextprotocol.util
Class KeepAliveScheduler.Builder
java.lang.Object
io.modelcontextprotocol.util.KeepAliveScheduler.Builder
- Enclosing class:
- KeepAliveScheduler
Builder class for creating KeepAliveScheduler instances with fluent API.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns a new KeepAliveScheduler instance.initialDelay(Duration initialDelay) Sets the initial delay before the first keepAlive call.Sets the interval between subsequent keepAlive calls.scheduler(reactor.core.scheduler.Scheduler scheduler) Sets the scheduler to use for executing keepAlive calls.
-
Method Details
-
scheduler
Sets the scheduler to use for executing keepAlive calls.- Parameters:
scheduler- The scheduler to use:- Schedulers.single() - single-threaded scheduler
- Schedulers.boundedElastic() - bounded elastic scheduler for I/O operations (Default)
- Schedulers.parallel() - parallel scheduler for CPU-intensive operations
- Schedulers.immediate() - immediate scheduler for synchronous execution
- Returns:
- This builder instance for method chaining
-
initialDelay
Sets the initial delay before the first keepAlive call.- Parameters:
initialDelay- The initial delay duration- Returns:
- This builder instance for method chaining
-
interval
Sets the interval between subsequent keepAlive calls.- Parameters:
interval- The interval duration- Returns:
- This builder instance for method chaining
-
build
Builds and returns a new KeepAliveScheduler instance.- Returns:
- A new KeepAliveScheduler configured with the builder's settings
-