|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.platform.admin.apiimpl.RuntimeStateAdminAPIHelper
public class RuntimeStateAdminAPIHelper
Singleton helper class for performing Runtime administrative functionality.
Constructor Summary | |
---|---|
protected |
RuntimeStateAdminAPIHelper(ClusteredRegistryState registry,
HostManagement hostManagement)
|
Method Summary | |
---|---|
void |
bounceServer()
Shutdown server and restart. |
byte[] |
exportLogs(java.lang.String hostName,
java.lang.String processName)
Export the server logs to a byte[]. |
java.util.List<ServiceRegistryBinding> |
getActiveServices(java.lang.String serviceType)
get the active services of given type |
java.util.Collection |
getConnectionPoolStats(ServiceRegistryBinding binding)
Return Collection of ConnectionPoolStats for a service. |
java.util.Date |
getEldestProcessStartTime()
|
java.util.List<java.lang.String> |
getHosts()
Return all hosts running in mm system. |
static RuntimeStateAdminAPIHelper |
getInstance(ClusteredRegistryState registry,
HostManagement hostManagement)
Get the singleton instance. |
java.util.List<ProcessRegistryBinding> |
getProcesses()
Return all processes. |
ServiceRegistryBinding |
getServiceBinding(ServiceID serviceID)
Return ServiceRegistryBinding for the given serviceID |
java.util.Collection |
getServiceQueueStatistics(ServiceRegistryBinding binding)
Return Collection of QueueStats for service. |
java.util.List<ServiceRegistryBinding> |
getServices()
Return serviceID's for all services running in mm system. |
SystemState |
getSystemState()
Return the running state of the system. |
ProcessManagement |
getVMControllerInterface(java.lang.String hostName,
java.lang.String processName)
|
java.net.InetAddress |
getVMHostName(java.lang.String hostName,
java.lang.String processName)
|
ProcessStatistics |
getVMStatistics(java.lang.String hostName,
java.lang.String processName)
Return VMStatistics object for Process. |
boolean |
isSystemStarted()
Return TRUE if the system is started; i.e. |
void |
restartService(ServiceID serviceID)
Restart a failed or stopped service. |
void |
setLogConfiguration(Configuration config,
LogConfiguration logConfig,
java.util.List actions,
java.lang.String principalName)
Set the Log Configuration in the database and propagate changes to other VM |
void |
shutdownServer()
Gracefully shutdown server waiting for work to complete. |
void |
startHost(java.lang.String host)
Start Host and all processes/services for host. |
void |
startProcess(java.lang.String host,
java.lang.String process)
Start Process and all services for process. |
void |
stopHost(java.lang.String host,
boolean stopNow)
Stop host processes/services. |
void |
stopProcess(java.lang.String hostName,
java.lang.String processName,
boolean stopNow)
Stop process. |
void |
stopService(ServiceID serviceID,
boolean stopNow)
Stop service. |
void |
synchronizeServer()
Synchronize running services with runtime configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected RuntimeStateAdminAPIHelper(ClusteredRegistryState registry, HostManagement hostManagement)
Method Detail |
---|
public static RuntimeStateAdminAPIHelper getInstance(ClusteredRegistryState registry, HostManagement hostManagement)
public SystemState getSystemState() throws MetaMatrixComponentException
MetaMatrixComponentException
- if an error occurred in communicating with a component.public boolean isSystemStarted() throws MetaMatrixComponentException
callerSessionID
- ID of the caller's current session.
MetaMatrixComponentException
- if an error occurred in communicating with a component.public java.util.List<java.lang.String> getHosts() throws MetaMatrixComponentException
callerSessionID
- ID of the caller's current session.
MetaMatrixComponentException
- if an error occurred in communicating with a component.public ProcessStatistics getVMStatistics(java.lang.String hostName, java.lang.String processName) throws MetaMatrixComponentException
callerSessionID
- ID of the caller's current session.VMControllerID
- ID of the process.
MetaMatrixComponentException
- if an error occurred in communicating with a component.public java.net.InetAddress getVMHostName(java.lang.String hostName, java.lang.String processName) throws MetaMatrixComponentException
MetaMatrixComponentException
public java.util.Collection getServiceQueueStatistics(ServiceRegistryBinding binding) throws MetaMatrixComponentException
binding
- The ServiceRegistryBinding
for the connector
MetaMatrixComponentException
- if an error occurred in communicating with a component.public java.util.Collection getConnectionPoolStats(ServiceRegistryBinding binding) throws MetaMatrixComponentException
binding
- The ServiceRegistryBinding
for the connector
MetaMatrixComponentException
- if an error occurred in communicating with a component.public ServiceRegistryBinding getServiceBinding(ServiceID serviceID) throws ResourceNotBoundException
serviceID
- Identifies service
ResourceNotBoundException
public java.util.List<ServiceRegistryBinding> getServices() throws MetaMatrixComponentException
callerSessionID
- ID of the caller's current session.
MetaMatrixComponentException
- if an error occurred in communicating with a component.public java.util.List<ServiceRegistryBinding> getActiveServices(java.lang.String serviceType) throws MetaMatrixComponentException
serviceType
-
MetaMatrixComponentException
public void shutdownServer() throws MetaMatrixComponentException
registry
- used by MetaMatrix to find the active VMs
MetaMatrixComponentException
- if an error occurred in communicating with a component.public void bounceServer() throws MetaMatrixComponentException
MetaMatrixComponentException
- if an error occurred in communicating with a component.public void synchronizeServer() throws MetaMatrixComponentException, MultipleException
MetaMatrixComponentException
- if an error occurred in communicating with a component.
a
- MultipleException if an error occurs
MultipleException
public ProcessManagement getVMControllerInterface(java.lang.String hostName, java.lang.String processName) throws ResourceNotBoundException
ResourceNotBoundException
public void restartService(ServiceID serviceID) throws MetaMatrixComponentException
registry
- the Registry.serviceID
- ID of service instance.
MetaMatrixComponentException
- if an error occurred in communicating with a component.public void setLogConfiguration(Configuration config, LogConfiguration logConfig, java.util.List actions, java.lang.String principalName) throws ConfigurationException, ServiceException, MetaMatrixComponentException
registry
- config
- logConfig
- actions
- token
-
ConfigurationLockException
ConfigurationException
ServiceException
MetaMatrixComponentException
RegistryCommunicationException
public void stopService(ServiceID serviceID, boolean stopNow) throws MetaMatrixComponentException
registry
- the Registry.serviceID
- ID of service instance.stopNow
- If true, stop forcefully. If false, wait until work is complete.
MetaMatrixComponentException
- if an error occurred in communicating with a component.public void startHost(java.lang.String host) throws MetaMatrixComponentException
registry
- The Registry.host
- Name of host to start.
MetaMatrixComponentException
- if an error occurred in communicating with a component.public void startProcess(java.lang.String host, java.lang.String process) throws MetaMatrixComponentException
registry
- The Registry.host
- Host processes belongs to.process
- Name of process to start.
MetaMatrixComponentException
- if an error occurred in communicating with a component.public void stopHost(java.lang.String host, boolean stopNow) throws MetaMatrixComponentException, MultipleException
registry
- The Registry.host
- Name of host.stopNow
- If true, stop forcefully. If false, wait until work is complete.
MetaMatrixComponentException
- if an error occurred in communicating with a component.
MultipleException
public void stopProcess(java.lang.String hostName, java.lang.String processName, boolean stopNow) throws AuthorizationException, MetaMatrixComponentException
registry
- The Registry.processID
- VMControllerID
.stopNow
- If true, stop forcefully. If false, wait until work is complete.
MetaMatrixComponentException
- if an error occurred in communicating with a component.
AuthorizationException
public byte[] exportLogs(java.lang.String hostName, java.lang.String processName) throws MetaMatrixComponentException
registry
- processID
- Identifies the process to use to get the logs. This will export all logs on the host that
contains the speciefied process.
AdminException
MetaMatrixComponentException
public java.util.List<ProcessRegistryBinding> getProcesses() throws MetaMatrixComponentException
MetaMatrixComponentException
- if an error occurred in communicating with a component.public java.util.Date getEldestProcessStartTime() throws MetaMatrixComponentException
MetaMatrixComponentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |