|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectio.airlift.bootstrap.LifeCycleManager
public class LifeCycleManager
Manages PostConstruct and PreDestroy life cycles
| Constructor Summary | |
|---|---|
LifeCycleManager(List<Object> managedInstances,
io.airlift.bootstrap.LifeCycleMethodsMap methodsMap)
|
|
| Method Summary | |
|---|---|
void |
addInstance(Object instance)
Add an additional managed instance |
int |
size()
Returns the number of managed instances |
void |
start()
Start the life cycle - all instances will have their PostConstruct method(s) called |
void |
stop()
Stop the life cycle - all instances will have their PreDestroy method(s) called |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LifeCycleManager(List<Object> managedInstances,
io.airlift.bootstrap.LifeCycleMethodsMap methodsMap)
throws Exception
managedInstances - list of objects that have life cycle annotationsmethodsMap - existing or new methods map
Exception - exceptions starting instances (depending on mode)| Method Detail |
|---|
public int size()
public void start()
throws Exception
PostConstruct method(s) called
Exception - errors
public void stop()
throws Exception
PreDestroy method(s) called
Exception - errors
public void addInstance(Object instance)
throws Exception
instance - instance to add
Exception - errors
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||