public class DropRequestOptions
extends java.lang.Object
| Constructor and Description |
|---|
DropRequestOptions()
Default constructor
|
DropRequestOptions(DropRequestOptions other)
Copy constructor
|
DropRequestOptions(io.vertx.core.json.JsonObject json)
Create an settings from JSON
|
| Modifier and Type | Method and Description |
|---|---|
long |
getBackpressureBufferCapacity() |
io.reactivex.BackpressureOverflowStrategy |
getBackpressureStrategy() |
int |
getDropRequestResponseCode() |
boolean |
isEnabled() |
DropRequestOptions |
setBackpressureBufferCapacity(long backpressureBufferCapacity)
Sets the backpressure buffer capacity, the number of request that single Server instance can
support concurrently.
|
DropRequestOptions |
setBackpressureStrategy(io.reactivex.BackpressureOverflowStrategy backpressureStrategy)
Sets the strategy how to deal with backpressure buffer overflow.
|
DropRequestOptions |
setDropRequestResponseCode(int dropRequestResponseCode)
Sets the HTTP response code returned wheb request is dropped.
|
DropRequestOptions |
setEnabled(boolean enabled)
Enabled/disables request dropping (backpressure) on heavy load.
|
io.vertx.core.json.JsonObject |
toJson()
Convert to JSON
|
public DropRequestOptions()
public DropRequestOptions(DropRequestOptions other)
other - the instance to copypublic DropRequestOptions(io.vertx.core.json.JsonObject json)
json - the JSONpublic io.vertx.core.json.JsonObject toJson()
public boolean isEnabled()
public DropRequestOptions setEnabled(boolean enabled)
enabled - true - request drop enabled, false if disabledpublic int getDropRequestResponseCode()
public DropRequestOptions setDropRequestResponseCode(int dropRequestResponseCode)
dropRequestResponseCode - status code integerpublic long getBackpressureBufferCapacity()
public DropRequestOptions setBackpressureBufferCapacity(long backpressureBufferCapacity)
backpressureBufferCapacity - long - capacity of the bufferpublic io.reactivex.BackpressureOverflowStrategy getBackpressureStrategy()
public DropRequestOptions setBackpressureStrategy(io.reactivex.BackpressureOverflowStrategy backpressureStrategy)
backpressureStrategy - a BackpressureOverflowStrategy value