|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.yarn.support.LifecycleObjectSupport
public abstract class LifecycleObjectSupport
Convenient base class for object which needs spring task scheduler, task executor and life cycle handling.
| Constructor Summary | |
|---|---|
LifecycleObjectSupport()
|
|
| Method Summary | |
|---|---|
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 org.springframework.beans.factory.BeanFactory |
getBeanFactory()
Gets the BeanFactory for this instance. |
int |
getPhase()
|
protected org.springframework.core.task.TaskExecutor |
getTaskExecutor()
Gets the defined TaskExecutor. |
protected org.springframework.scheduling.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(org.springframework.beans.factory.BeanFactory beanFactory)
|
void |
setPhase(int phase)
Sets the phase. |
void |
setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
Sets the used TaskExecutor. |
void |
setTaskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler)
Sets the used TaskScheduler. |
void |
setYarnEventPublisher(YarnEventPublisher yarnEventPublisher)
Sets the yarn event publisher. |
void |
start()
|
void |
stop()
|
void |
stop(java.lang.Runnable callback)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LifecycleObjectSupport()
| Method Detail |
|---|
public final void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
public final void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionpublic final boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic final int getPhase()
getPhase in interface org.springframework.context.Phasedpublic final boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic final void start()
start in interface org.springframework.context.Lifecyclepublic final void stop()
stop in interface org.springframework.context.Lifecyclepublic final void stop(java.lang.Runnable callback)
stop in interface org.springframework.context.SmartLifecyclepublic void setAutoStartup(boolean autoStartup)
autoStartup - the new auto startupSmartLifecyclepublic void setPhase(int phase)
phase - the new phaseSmartLifecycleprotected final org.springframework.beans.factory.BeanFactory getBeanFactory()
BeanFactory for this instance.
public void setTaskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler)
TaskScheduler.
taskScheduler - the task schedulerprotected org.springframework.scheduling.TaskScheduler getTaskScheduler()
TaskScheduler.
public void setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
TaskExecutor.
taskExecutor - the task executorpublic YarnEventPublisher getYarnEventPublisher()
public void setYarnEventPublisher(YarnEventPublisher yarnEventPublisher)
yarnEventPublisher - the new yarn event publisherprotected org.springframework.core.task.TaskExecutor getTaskExecutor()
TaskExecutor.
protected void onInit()
throws java.lang.Exception
InitializingBean phase. Implementor should
always call super method not to break initialization chain.
java.lang.Exception - exceptionprotected void doStart()
lifecycleLock.
protected void doStop()
lifecycleLock.
|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||