|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.service.AbstractService
com.bigdata.jini.start.AbstractServicesManagerService
public abstract class AbstractServicesManagerService
Core impl.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.bigdata.service.IServiceShutdown |
|---|
IServiceShutdown.Options |
| Field Summary | |
|---|---|
protected MonitorCreatePhysicalServiceLocksTask |
monitorCreatePhysicalServiceLocksTask
The task used to start and restart services. |
protected boolean |
startupRunning
true iff a ServicesManagerStartupTask is currently
running. |
| Fields inherited from class com.bigdata.service.AbstractService |
|---|
log |
| Constructor Summary | |
|---|---|
protected |
AbstractServicesManagerService(Properties properties)
|
| Method Summary | |
|---|---|
void |
add(ProcessHelper service)
|
abstract JiniFederation<?> |
getFederation()
Strengthen the return type. |
Properties |
getProperties()
An object wrapping the properties specified to the ctor. |
Class |
getServiceIface()
Return the most interesting interface for the service. |
boolean |
isOpen()
Return true iff the service is running. |
protected void |
killChildProcesses(boolean immediateShutdown)
Sets a flag to disallow new process starts and kills any running child processes. |
void |
remove(ProcessHelper service)
|
protected void |
setup()
Establish watchers for all nodes of interest and populate the federation configuration if the [zroot] does not exist. |
void |
shutdown()
Kill the child processes, using RemoteDestroyAdmin.shutdown()
where supported. |
void |
shutdownNow()
Kill the child processes, using RemoteDestroyAdmin.shutdownNow()
where supported. |
AbstractServicesManagerService |
start()
Starts the AbstractService. |
| Methods inherited from class com.bigdata.service.AbstractService |
|---|
clearLoggingContext, destroy, getHostname, getServiceName, getServiceUUID, setServiceUUID, setupLoggingContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.bigdata.jini.start.IServicesManagerService |
|---|
sighup |
| Field Detail |
|---|
protected volatile boolean startupRunning
true iff a ServicesManagerStartupTask is currently
running. An instance of that task is started during normal startup, but
instances of that task can be started by the SIGHUP handler as well. This
flag is used to prevent concurrent instances of that task from running.
protected MonitorCreatePhysicalServiceLocksTask monitorCreatePhysicalServiceLocksTask
| Constructor Detail |
|---|
protected AbstractServicesManagerService(Properties properties)
| Method Detail |
|---|
public Properties getProperties()
public void add(ProcessHelper service)
add in interface IServiceListenerpublic void remove(ProcessHelper service)
remove in interface IServiceListenerpublic void shutdown()
RemoteDestroyAdmin.shutdown()
where supported.
FIXME This should also bring down any processes that are being managed on
this host regardless of whether or not they are child processes. For
example, you KILL -9 the ServicesManager [leaves children running], start
it, and then kill -s TERM it [should have discovered processes on this
host for which it has responsibility and sent them shutdown() requests].
Add a private killManagedProcesses() method for this.
shutdown in interface IServiceShutdownshutdown in class AbstractServicepublic void shutdownNow()
RemoteDestroyAdmin.shutdownNow()
where supported.
shutdownNow in interface IServiceShutdownshutdownNow in class AbstractServicepublic boolean isOpen()
IServiceShutdowntrue iff the service is running.
isOpen in interface IServiceShutdownprotected void killChildProcesses(boolean immediateShutdown)
immediateShutdown - When true
RemoteDestroyAdmin.shutdownNow() will be used by
preference to terminate child processes which support
RemoteDestroyAdmin. Otherwise
RemoteDestroyAdmin.shutdown() will be used to terminat
child processes supporting that interface.public Class getServiceIface()
AbstractService
getServiceIface in interface IServicegetServiceIface in class AbstractServicepublic abstract JiniFederation<?> getFederation()
getFederation in class AbstractServicepublic AbstractServicesManagerService start()
AbstractServiceAbstractService.
Note: A AbstractService.start() is required in order to give subclasses an
opportunity to be fully initialized before they are required to begin
operations. It is impossible to encapsulate the startup logic cleanly
without this ctor() + start() pattern. Those familiar with Objective-C
will recognized this.
start in class AbstractService
protected void setup()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||