01: package biz.hammurapi.config;
02:
03: public interface RestartCommand extends Runnable {
04:
05: public static final String RESTART_DELARY_PROPERTY = RestartCommand.class
06: .getName()
07: + ":restart-delay";
08:
09: public static final long DEFAULT_RESTART_DELAY = 5000;
10:
11: /**
12: * @return Number of times the command was already executed.
13: */
14: int getAttempt();
15:
16: /**
17: * @return Number of milliseconds the command waits before creating
18: * and starting the object. The command waits only if number of attempts is
19: * more than zero. The value is taken from the system property with the name
20: * specified in RESTART_DELAY_PROPERTY constant. Default restart delay is specified in
21: * DEFAULT_RESTART_DELAY constant.
22: */
23: long getRestartDelay();
24: }
|