|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.platform.vm.controller.VMController
public abstract class VMController
This class is used to start up and bind VM's to the naming server. The following command will startup a standalone vm with no services.
The following command will startup a vm and start services as defined in the deployment model. The vmName must exist in the property service.java com.metamatrix.framework.vm.controller.VMControllerfalse log.txt
java com.metamatrix.framework.vm.controller.VMController vmName true log.txt
Field Summary | |
---|---|
protected ClientServiceRegistry |
clientServices
|
static int |
DEFAULT_STARTER_MAX_THREADS
|
static int |
DEFAULT_STARTER_TIMETOLIVE
|
protected Host |
host
|
protected VMControllerID |
id
|
protected ClusteredRegistryState |
registry
|
static java.lang.String |
SERVICE_MONITOR_INTERVAL
Interval to check the state of services (ms) |
static java.lang.String |
STARTER_MAX_THREADS
|
static java.lang.String |
STARTER_TIMETOLIVE
Time-to-live for threads used to start services (ms) |
protected java.lang.String |
vmName
|
Constructor Summary | |
---|---|
VMController(Host host,
java.lang.String vmName,
VMControllerID vmId,
ClusteredRegistryState registry,
ServerEvents serverEvents,
MessageBus bus,
HostManagement hostManagement)
Create a new instance of VMController. |
Method Summary | |
---|---|
void |
checkService(ServiceID serviceID)
Check a service, and updates the state in some cases. |
protected void |
doStopVM(boolean now,
boolean shutdown)
|
protected static void |
doUsage()
|
void |
dumpThreads()
Prints thread information to a log file. |
byte[] |
exportLogs()
Export the server logs to a byte[]. |
java.net.InetAddress |
getAddress()
Get the address of the host this VM is running on. |
Host |
getConfigHost()
|
LogConfiguration |
getCurrentLogConfiguration()
Return current log configuration for this vm. |
VMControllerID |
getID()
Get the ID for this controller. |
java.lang.String |
getName()
Get the name for this controller. |
abstract WorkerPoolStats |
getProcessPoolStats()
|
protected java.util.Properties |
getProperties()
|
abstract SocketListenerStats |
getSocketListenerStats()
|
java.util.Date |
getStartTime()
Get the time the VM was initialized. |
VMStatistics |
getVMStatistics()
Return information about VM. |
boolean |
isShuttingDown()
Returns true if system is being shutdown. |
protected boolean |
isStarted()
Return TRUE if the system's services are started; i.e. |
protected void |
logMessage(java.lang.String s)
|
void |
ping()
Method called from registries to determine if VMController is alive. |
void |
runGC()
Run GC on vm. |
void |
setCurrentLogConfiguration(LogConfiguration logConfiguration)
Set the current log configuration for this vm. |
void |
shutdown()
Shut down all services waiting for work to complete. |
void |
shutdownNow()
Shut down all services without waiting for work to complete. |
void |
shutdownService(ServiceID serviceID)
Shut down service waiting for work to complete. |
void |
shutdownServiceNow(ServiceID serviceID)
Shut down service without waiting for work to complete. |
void |
startDeployedService(ServiceComponentDefnID id)
Start the service identified by the ServiceComponentID If synch is true then wait for service to start before returning. |
void |
startService(ServiceID serviceID)
Start a previously stopped service |
void |
startVM()
Starts the VM by invoking all the deployed services |
void |
stopAllServices()
Kill services |
void |
stopAllServicesNow()
Kill services now!!! |
void |
stopService(ServiceID id)
Kill service once work is complete |
void |
stopServiceNow(ServiceID id)
Kill service now!!! |
void |
stopVM()
Kill all services (waiting for work to complete) and then kill the vm. |
void |
stopVMNow()
Kill all services now, do not wait for work to complete, do not collect $200 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STARTER_MAX_THREADS
public static final java.lang.String STARTER_TIMETOLIVE
public static final java.lang.String SERVICE_MONITOR_INTERVAL
public static final int DEFAULT_STARTER_MAX_THREADS
public static final int DEFAULT_STARTER_TIMETOLIVE
protected Host host
protected java.lang.String vmName
protected VMControllerID id
protected ClusteredRegistryState registry
protected ClientServiceRegistry clientServices
Constructor Detail |
---|
public VMController(Host host, java.lang.String vmName, VMControllerID vmId, ClusteredRegistryState registry, ServerEvents serverEvents, MessageBus bus, HostManagement hostManagement) throws java.lang.Exception
vmName
- Name of VMstartDeployedServices
- If true all services that are deployed to this vm are started.standalone
- If true indicates that VMController is running in its own vm.
java.lang.Exception
- if an error occurs initializing vmControllerMethod Detail |
---|
protected void logMessage(java.lang.String s)
protected static void doUsage()
public VMControllerID getID()
VMControllerInterface
getID
in interface VMControllerInterface
public void startVM()
VMControllerInterface
startVM
in interface VMControllerInterface
public void startService(ServiceID serviceID)
VMControllerInterface
startService
in interface VMControllerInterface
public void startDeployedService(ServiceComponentDefnID id)
VMControllerInterface
startDeployedService
in interface VMControllerInterface
public void stopVM()
stopVM
in interface VMControllerInterface
protected void doStopVM(boolean now, boolean shutdown)
public void stopVMNow()
stopVMNow
in interface VMControllerInterface
public void stopService(ServiceID id)
stopService
in interface VMControllerInterface
public void stopServiceNow(ServiceID id)
stopServiceNow
in interface VMControllerInterface
public void stopAllServicesNow() throws MultipleException
stopAllServicesNow
in interface VMControllerInterface
MultipleException
public void stopAllServices() throws MultipleException
stopAllServices
in interface VMControllerInterface
MultipleException
public void shutdown()
shutdown
in interface VMControllerInterface
public void shutdownNow()
shutdownNow
in interface VMControllerInterface
public void shutdownService(ServiceID serviceID)
VMControllerInterface
shutdownService
in interface VMControllerInterface
public void shutdownServiceNow(ServiceID serviceID)
shutdownServiceNow
in interface VMControllerInterface
public LogConfiguration getCurrentLogConfiguration()
getCurrentLogConfiguration
in interface VMControllerInterface
public void setCurrentLogConfiguration(LogConfiguration logConfiguration)
setCurrentLogConfiguration
in interface VMControllerInterface
public java.util.Date getStartTime()
getStartTime
in interface VMControllerInterface
public Host getConfigHost()
public void ping()
ping
in interface VMControllerInterface
public boolean isShuttingDown()
VMControllerInterface
isShuttingDown
in interface VMControllerInterface
public VMStatistics getVMStatistics()
getVMStatistics
in interface VMControllerInterface
public void dumpThreads()
dumpThreads
in interface VMControllerInterface
public void runGC()
runGC
in interface VMControllerInterface
public byte[] exportLogs()
VMControllerInterface
exportLogs
in interface VMControllerInterface
VMControllerInterface.exportLogs()
public abstract SocketListenerStats getSocketListenerStats()
public abstract WorkerPoolStats getProcessPoolStats()
public void checkService(ServiceID serviceID)
checkService
in interface VMControllerInterface
serviceID
- Identifies service to be stoppedprotected java.util.Properties getProperties()
protected boolean isStarted()
callerSessionID
- ID of the caller's current session.
MetaMatrixComponentException
- if an error occurred in communicating with a component.public java.net.InetAddress getAddress()
VMControllerInterface
getAddress
in interface VMControllerInterface
public java.lang.String getName()
VMControllerInterface
getName
in interface VMControllerInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |