|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.data.hadoop.store.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 behaviour. |
protected void |
doStop()
Subclasses may implement this method with the stop behaviour. |
protected BeanFactory |
getBeanFactory()
Gets the BeanFactory for this instance. |
int |
getPhase()
|
StoreEventPublisher |
getStoreEventPublisher()
Gets the store event publisher. |
protected TaskExecutor |
getTaskExecutor()
Gets the defined TaskExecutor. |
protected TaskScheduler |
getTaskScheduler()
Gets the defined TaskScheduler. |
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 |
setStoreEventPublisher(StoreEventPublisher storeEventPublisher)
Sets the store event publisher. |
void |
setTaskExecutor(TaskExecutor taskExecutor)
Sets the used TaskExecutor. |
void |
setTaskScheduler(TaskScheduler taskScheduler)
Sets the used TaskScheduler. |
void |
start()
|
void |
stop()
|
void |
stop(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 InitializingBean
public final void setBeanFactory(BeanFactory beanFactory)
throws BeansException
setBeanFactory in interface BeanFactoryAwareBeansExceptionpublic final boolean isAutoStartup()
isAutoStartup in interface SmartLifecyclepublic final int getPhase()
getPhase in interface Phasedpublic final boolean isRunning()
isRunning in interface Lifecyclepublic final void start()
start in interface Lifecyclepublic final void stop()
stop in interface Lifecyclepublic 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 StoreEventPublisher getStoreEventPublisher()
public void setStoreEventPublisher(StoreEventPublisher storeEventPublisher)
storeEventPublisher - the new store event publisherprotected TaskExecutor getTaskExecutor()
TaskExecutor.
protected void onInit()
throws Exception
InitializingBean phase.
Implementor should always call super method not to break initialization chain.
Exceptionprotected void doStart()
lifecycleLock.
protected void doStop()
lifecycleLock.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||