Class ServerTimeouts


  • public class ServerTimeouts
    extends Object
    • 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
    • Constructor Detail

      • ServerTimeouts

        public ServerTimeouts()
    • 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)