public abstract class LifecycleObjectSupport extends Object implements InitializingBean, SmartLifecycle, BeanFactoryAware
| Constructor and Description |
|---|
LifecycleObjectSupport() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected void |
doStart()
Subclasses may implement this method with the start behavior.
|
protected void |
doStop()
Subclasses may implement this method with the stop behavior.
|
protected BeanFactory |
getBeanFactory()
Gets the
BeanFactory for this instance. |
int |
getPhase() |
protected TaskExecutor |
getTaskExecutor()
Gets the defined
TaskExecutor. |
protected TaskScheduler |
getTaskScheduler()
Gets the defined
TaskScheduler. |
YarnEventPublisher |
getYarnEventPublisher()
Gets the yarn event publisher.
|
boolean |
isAutoStartup() |
boolean |
isRunning() |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setAutoStartup(boolean autoStartup)
Sets the auto startup.
|
void |
setBeanFactory(BeanFactory beanFactory) |
void |
setPhase(int phase)
Sets the phase.
|
void |
setTaskExecutor(TaskExecutor taskExecutor)
Sets the used
TaskExecutor. |
void |
setTaskScheduler(TaskScheduler taskScheduler)
Sets the used
TaskScheduler. |
void |
setYarnEventPublisher(YarnEventPublisher yarnEventPublisher)
Sets the yarn event publisher.
|
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
public final void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanpublic final void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory in interface BeanFactoryAwareBeansExceptionpublic final boolean isAutoStartup()
isAutoStartup in interface SmartLifecyclepublic final void stop(Runnable callback)
stop in interface SmartLifecyclepublic void setAutoStartup(boolean autoStartup)
autoStartup - the new auto startupSmartLifecyclepublic void setPhase(int phase)
phase - the new phaseSmartLifecycleprotected final BeanFactory getBeanFactory()
BeanFactory for this instance.public void setTaskScheduler(TaskScheduler taskScheduler)
TaskScheduler.taskScheduler - the task schedulerprotected TaskScheduler getTaskScheduler()
TaskScheduler.public void setTaskExecutor(TaskExecutor taskExecutor)
TaskExecutor.taskExecutor - the task executorpublic YarnEventPublisher getYarnEventPublisher()
public void setYarnEventPublisher(YarnEventPublisher yarnEventPublisher)
yarnEventPublisher - the new yarn event publisherprotected TaskExecutor getTaskExecutor()
TaskExecutor.protected void onInit()
throws Exception
InitializingBean phase. Implementor should
always call super method not to break initialization chain.Exception - exceptionprotected void doStart()
lifecycleLock.protected void doStop()
lifecycleLock.