public class LifeSupport extends Object implements Lifecycle
| Constructor and Description |
|---|
LifeSupport() |
LifeSupport(org.neo4j.kernel.impl.util.StringLogger log) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
add(T instance)
Add a new Lifecycle instance.
|
void |
addLifecycleListener(LifecycleListener listener) |
void |
clear()
Shutdown and throw away all the current instances.
|
void |
dump(org.neo4j.kernel.impl.util.StringLogger logger) |
Iterable<Lifecycle> |
getLifecycleInstances() |
LifecycleStatus |
getStatus() |
void |
init()
Initialize all registered instances, transitioning from status NONE to STOPPED.
|
boolean |
remove(Object instance) |
void |
removeLifecycleListener(LifecycleListener listener) |
void |
restart(Lifecycle instance)
Restart an individual instance.
|
void |
shutdown()
Shutdown all registered instances, transitioning from either STARTED or STOPPED to SHUTDOWN.
|
void |
start()
Start all registered instances, transitioning from STOPPED to STARTED.
|
void |
stop()
Stop all registered instances, transitioning from STARTED to STOPPED.
|
public LifeSupport()
public LifeSupport(org.neo4j.kernel.impl.util.StringLogger log)
public void init()
throws LifecycleException
init in interface LifecycleLifecycleExceptionpublic void start()
throws LifecycleException
start in interface LifecycleLifecycleExceptionpublic void stop()
throws LifecycleException
stop in interface LifecycleLifecycleExceptionpublic void shutdown()
throws LifecycleException
shutdown in interface LifecycleLifecycleExceptionpublic void restart(Lifecycle instance) throws LifecycleException, IllegalArgumentException
LifecycleException - if any start or stop failsIllegalArgumentException - if instance is not registeredpublic <T> T add(T instance)
throws LifecycleException
T - type of the instanceinstance - the Lifecycle instance to addLifecycleException - if the instance could not be transitioned properlypublic boolean remove(Object instance)
public void clear()
public LifecycleStatus getStatus()
public void addLifecycleListener(LifecycleListener listener)
public void removeLifecycleListener(LifecycleListener listener)
public void dump(org.neo4j.kernel.impl.util.StringLogger logger)
Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.