Package org.apache.tika.server
Class ServerTimeouts
- java.lang.Object
-
- org.apache.tika.server.ServerTimeouts
-
public class ServerTimeouts extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_CHILD_STARTUP_MILLIS
Number of milliseconds to wait for child process to startupstatic long
DEFAULT_PING_PULSE_MILLIS
How often should the parent try to ping the child to check statusstatic 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 Summary
Constructors Constructor Description ServerTimeouts()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getMaxChildStartupMillis()
Maximum time in millis to allow for the child process to startup or restartint
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)
-
-
-
Field Detail
-
DEFAULT_PING_TIMEOUT_MILLIS
public static final 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.- See Also:
- Constant Field Values
-
DEFAULT_PING_PULSE_MILLIS
public static final long DEFAULT_PING_PULSE_MILLIS
How often should the parent try to ping the child to check status- See Also:
- Constant Field Values
-
DEFAULT_TASK_TIMEOUT_MILLIS
public static final 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.- See Also:
- Constant Field Values
-
DEFAULT_CHILD_STARTUP_MILLIS
public static final long DEFAULT_CHILD_STARTUP_MILLIS
Number of milliseconds to wait for child process to startup- See Also:
- Constant Field Values
-
-
Method Detail
-
getTaskTimeoutMillis
public long getTaskTimeoutMillis()
How long to wait for a task before shutting down the child server process and restarting it.- Returns:
-
setTaskTimeoutMillis
public void setTaskTimeoutMillis(long taskTimeoutMillis)
- Parameters:
taskTimeoutMillis
- number of milliseconds to allow per task (parse, detection, unzipping, etc.)
-
getPingTimeoutMillis
public long getPingTimeoutMillis()
-
setPingTimeoutMillis
public void setPingTimeoutMillis(long pingTimeoutMillis)
- Parameters:
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 process
-
getPingPulseMillis
public long getPingPulseMillis()
-
setPingPulseMillis
public void setPingPulseMillis(long pingPulseMillis)
- Parameters:
pingPulseMillis
- how often to test that the parent and/or child is alive
-
getMaxRestarts
public int getMaxRestarts()
-
setMaxRestarts
public void setMaxRestarts(int maxRestarts)
-
getMaxChildStartupMillis
public long getMaxChildStartupMillis()
Maximum time in millis to allow for the child process to startup or restart- Returns:
-
setMaxChildStartupMillis
public void setMaxChildStartupMillis(long maxChildStartupMillis)
-
-