public class ServerTimeouts extends Object
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_CHILD_STARTUP_MILLIS
Number of milliseconds to wait for child process to startup
|
static long |
DEFAULT_PING_PULSE_MILLIS
How often should the parent try to ping the child to check status
|
static long |
DEFAULT_PING_TIMEOUT_MILLIS
If the child doesn't receive a ping or the parent doesn't
hear back from a ping in this amount of time, kill and restart the child.
|
static long |
DEFAULT_TASK_TIMEOUT_MILLIS
Number of milliseconds to wait per server task (parse, detect, unpack, translate,
etc.) before timing out and shutting down the child process.
|
Constructor and Description |
---|
ServerTimeouts() |
Modifier and Type | Method and Description |
---|---|
long |
getMaxChildStartupMillis()
Maximum time in millis to allow for the child process to startup
or restart
|
int |
getMaxRestarts() |
long |
getPingPulseMillis() |
long |
getPingTimeoutMillis() |
long |
getTaskTimeoutMillis()
How long to wait for a task before shutting down the child server process
and restarting it.
|
void |
setMaxChildStartupMillis(long maxChildStartupMillis) |
void |
setMaxRestarts(int maxRestarts) |
void |
setPingPulseMillis(long pingPulseMillis) |
void |
setPingTimeoutMillis(long pingTimeoutMillis) |
void |
setTaskTimeoutMillis(long taskTimeoutMillis) |
public static final long DEFAULT_PING_TIMEOUT_MILLIS
public static final long DEFAULT_PING_PULSE_MILLIS
public static final long DEFAULT_TASK_TIMEOUT_MILLIS
public static final long DEFAULT_CHILD_STARTUP_MILLIS
public long getTaskTimeoutMillis()
public void setTaskTimeoutMillis(long taskTimeoutMillis)
taskTimeoutMillis
- number of milliseconds to allow per task
(parse, detection, unzipping, etc.)public long getPingTimeoutMillis()
public void setPingTimeoutMillis(long pingTimeoutMillis)
pingTimeoutMillis
- if the parent doesn't receive a response
in this amount of time, or
if the child doesn't receive a ping
in this amount of time, restart the child processpublic long getPingPulseMillis()
public void setPingPulseMillis(long pingPulseMillis)
pingPulseMillis
- how often to test that the parent and/or child is alivepublic int getMaxRestarts()
public void setMaxRestarts(int maxRestarts)
public long getMaxChildStartupMillis()
public void setMaxChildStartupMillis(long maxChildStartupMillis)
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.