Package org.alfresco.repo.shutdown
Class ShutdownBackstop
java.lang.Object
org.springframework.extensions.surf.util.AbstractLifecycleBean
org.alfresco.repo.shutdown.ShutdownBackstop
- All Implemented Interfaces:
EventListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
public class ShutdownBackstop
extends org.springframework.extensions.surf.util.AbstractLifecycleBean
The Shutdown backstop is a spring bean that will ensure that shutdown completes
within a given time.
If alfresco is blocked - for example waiting for a remote resource or a long
running actionbackstop will wait for a timeout and then call System.exit()
- Author:
- mrogers
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanprotected voidonBootstrap(org.springframework.context.ApplicationEvent event) protected voidonShutdown(org.springframework.context.ApplicationEvent event) voidsetEnabled(boolean enabled) voidsetTimeout(int timeout) Methods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
getApplicationContext, onApplicationEvent, setApplicationContext
-
Field Details
-
log
protected static final org.apache.commons.logging.Log log
-
-
Constructor Details
-
ShutdownBackstop
public ShutdownBackstop()
-
-
Method Details
-
setTimeout
public void setTimeout(int timeout) -
getTimeout
public int getTimeout() -
onBootstrap
protected void onBootstrap(org.springframework.context.ApplicationEvent event) - Specified by:
onBootstrapin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event) - Specified by:
onShutdownin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
setEnabled
public void setEnabled(boolean enabled) -
isEnabled
public boolean isEnabled()
-