Interface InstancesManager
public interface InstancesManager
-
Method Summary
Modifier and TypeMethodDescriptionvoidCreates a server instance.voidDeletes an instance identified by the given name.intReturns status of an instance.booleanvoidString[]Lists all the instances.Starts the instance.startInstance(String[] interativeOptions) Starts the instance.startInstance(String[] interativeOptions, String[] commandLineArgs) Starts the instance.startInstance(String[] interativeOptions, String[] commandLineArgs, Properties envProps) Starts the instance.voidStops the instance.booleanstopInstanceWithinTime(int timeout) Trys to stop the instance with the specified timeout.
-
Method Details
-
createInstance
Creates a server instance.- Throws:
InstanceException- This exception is thrown if - the instance already exists. - an invalid or insufficient config. is supplied. - an exception occurred during instance creation.
-
deleteInstance
Deletes an instance identified by the given name. (Should we stop the instance before deleting the instance?)- Throws:
InstanceException- This exception is thrown if - the instance doesnot exist. - an exception occurred while deleting the instance.
-
startInstance
Starts the instance.- Parameters:
startParams-- Throws:
InstanceException
-
startInstance
Starts the instance.- Parameters:
interativeOptions- which may be used for security, these paramters are passed in on the standard input stream of the executing process- Throws:
InstanceException
-
startInstance
Process startInstance(String[] interativeOptions, String[] commandLineArgs) throws InstanceException Starts the instance.- Parameters:
interativeOptions- which may be used for security, these paramters are passed in on the standard input stream of the executing processcommandLineArgs- is additional commandline arguments that are to be appended to the processes commandline when it starts- Throws:
InstanceException
-
startInstance
Process startInstance(String[] interativeOptions, String[] commandLineArgs, Properties envProps) throws InstanceException Starts the instance.- Parameters:
interativeOptions- which may be used for security, these paramters are passed in on the standard input stream of the executing processcommandLineArgs- is additional commandline arguments that are to be appended to the processes commandline when it startsenvProps- properties to be added to System- Throws:
InstanceException
-
stopInstance
Stops the instance.- Throws:
InstanceException
-
listInstances
Lists all the instances.- Throws:
InstanceException
-
getInstanceStatus
Returns status of an instance.- Throws:
InstanceException
-
isRestartNeeded
- Returns:
- true if the instance requires a restart for some config changes to take effect, false otherwise.
- Throws:
InstanceException
-
getNativeName
String getNativeName() -
stopInstanceWithinTime
Trys to stop the instance with the specified timeout. Returns true if success; false if failure- Throws:
InstanceException
-
killRelatedProcesses
- Throws:
InstanceException
-