From 21a501f8bc8333cfe4fb2df554fa4e1d47732633 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Fri, 29 Jul 2011 21:39:42 +0000 Subject: [PATCH] Document Lifecycle#stop concurrency semantics Issue: SPR-8570 git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4822 50f2f4bb-b051-0410-bef5-90022cba6387 --- .../main/java/org/springframework/context/Lifecycle.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/org.springframework.context/src/main/java/org/springframework/context/Lifecycle.java b/org.springframework.context/src/main/java/org/springframework/context/Lifecycle.java index 1d489a80b9a..748bb350410 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/Lifecycle.java +++ b/org.springframework.context/src/main/java/org/springframework/context/Lifecycle.java @@ -55,10 +55,14 @@ public interface Lifecycle { void start(); /** - * Stop this component. - * Should not throw an exception if the component isn't started yet. + * Stop this component, typically in a synchronous fashion, such that + * the component is fully stopped upon return of this method. Consider + * implementing {@link SmartLifecycle} and its {@code stop(Runnable)} + * variant in cases where asynchronous stop behavior is necessary. + *

Should not throw an exception if the component isn't started yet. *

In the case of a container, this will propagate the stop signal * to all components that apply. + * @see SmartLifecycle#stop(Runnable) */ void stop();