File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
org.springframework.context/src/main/java/org/springframework/context Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 25
25
*/
26
26
public interface SmartLifecycle extends Lifecycle {
27
27
28
+ /**
29
+ * Return whether this Lifecycle component should be started automatically
30
+ * by the container when the ApplicationContext is refreshed. A value of
31
+ * "false" indicates that the component is intended to be started manually.
32
+ */
28
33
boolean isAutoStartup ();
29
34
35
+ /**
36
+ * Return the order in which this Lifecycle component should be stopped.
37
+ * The shutdown process begins with the component(s) having the <i>lowest</i>
38
+ * value and ends with the highest value (Integer.MIN_VALUE is the lowest
39
+ * possible, and Integer.MAX_VALUE is the highest possible). Any Lifecycle
40
+ * components within the context that do not also implement SmartLifecycle
41
+ * will be treated as if they have a value of Integer.MAX_VALUE.
42
+ */
30
43
int getShutdownOrder ();
31
44
45
+ /**
46
+ * Indicates that a Lifecycle component must stop if it is currently running.
47
+ * The provided callback is used by the LifecycleProcessor to support an
48
+ * ordered, and potentially concurrent, shutdown of all components having a
49
+ * common shutdown order value. The callback <b>must</b> be executed after
50
+ * the SmartLifecycle component does indeed stop.
51
+ */
32
52
void stop (Runnable callback );
33
53
34
54
}
You can’t perform that action at this time.
0 commit comments