| Modifier and Type | Class and Description |
|---|---|
static class |
RouterOptions.Builder
Builder for
RouterOptions. |
| Modifier and Type | Field and Description |
|---|---|
static Scheduler |
DEFAULT_RATE_LIMIT_SCHEDULER
The default
Scheduler to delay rate limited requests. |
static int |
DEFAULT_REQUEST_PARALLELISM
The default number of router requests allowed in parallel.
|
static Scheduler |
DEFAULT_RESPONSE_SCHEDULER
The default
Scheduler to publish responses. |
| Modifier | Constructor and Description |
|---|---|
protected |
RouterOptions(RouterOptions.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
static RouterOptions.Builder |
builder()
Returns a new
RouterOptions.Builder to construct RouterOptions. |
static RouterOptions |
create()
Returns a new
RouterOptions with default settings. |
GlobalRateLimiter |
getGlobalRateLimiter()
Returns the currently configured
GlobalRateLimiter. |
Scheduler |
getRateLimitScheduler()
Returns the defined scheduler for rate limiting delay purposes.
|
int |
getRequestParallelism()
Deprecated.
for removal, using
getGlobalRateLimiter() instead |
Scheduler |
getResponseScheduler()
Returns the defined response scheduler.
|
List<ResponseFunction> |
getResponseTransformers()
Returns the list of
ResponseFunction transformations that can be applied to every response. |
public static final Scheduler DEFAULT_RESPONSE_SCHEDULER
Scheduler to publish responses. Allows blocking usage.public static final Scheduler DEFAULT_RATE_LIMIT_SCHEDULER
Scheduler to delay rate limited requests.public static final int DEFAULT_REQUEST_PARALLELISM
protected RouterOptions(RouterOptions.Builder builder)
public static RouterOptions.Builder builder()
RouterOptions.Builder to construct RouterOptions.RouterOptions builderpublic static RouterOptions create()
RouterOptions with default settings. See DEFAULT_RESPONSE_SCHEDULER and
DEFAULT_RATE_LIMIT_SCHEDULER for the default values.RouterOptionspublic Scheduler getResponseScheduler()
Scheduler that allows
blocking is set.Schedulerpublic Scheduler getRateLimitScheduler()
Schedulerpublic List<ResponseFunction> getResponseTransformers()
ResponseFunction transformations that can be applied to every response. They are
to be
processed in the given order.ResponseFunction objects.@Deprecated public int getRequestParallelism()
getGlobalRateLimiter() insteadRouter should adhere to.public GlobalRateLimiter getGlobalRateLimiter()
GlobalRateLimiter. Defaults to SemaphoreGlobalRateLimiter with
parallelism of DEFAULT_REQUEST_PARALLELISM or the value supplied via the builder.GlobalRateLimiter