| |
|
| java.lang.Object com.mysql.jdbc.util.ServerController
ServerController | public class ServerController (Code) | | Controls a MySQL server using Java RunTime methods
version: $Id: ServerController.java,v 1.1.2.1 2005/05/13 18:58:39 mmatthews version: Exp $ author: Mark Matthews |
Constructor Summary | |
public | ServerController(String baseDir) Creates a ServerController with the directory for the MySQL server. | public | ServerController(String basedir, String datadir) Creates a server controller for the MySQL server with the given basedir
and datadir. |
Method Summary | |
public void | forceStop() Forcefully terminates the server process (if started). | public synchronized Properties | getServerProps() Returns the list of properties that will be used to start/control the
server. | public void | setBaseDir(String baseDir) Sets the basedir to use when starting MySQL. | public void | setDataDir(String dataDir) Sets the data to use when starting MySQL. | public Process | start() Starts the server, returning a java.lang.Process instance that represents
the mysql server. | public void | stop(boolean forceIfNecessary) |
BASEDIR_KEY | final public static String BASEDIR_KEY(Code) | | Where is the server installed?
|
DATADIR_KEY | final public static String DATADIR_KEY(Code) | | Where are the databases installed?
|
DEFAULTS_FILE_KEY | final public static String DEFAULTS_FILE_KEY(Code) | | Where is the config file located?
|
EXECUTABLE_NAME_KEY | final public static String EXECUTABLE_NAME_KEY(Code) | | What is the name of the executable to run?
|
EXECUTABLE_PATH_KEY | final public static String EXECUTABLE_PATH_KEY(Code) | | What is the path to the mysql server executable (if not standard?)
|
ServerController | public ServerController(String baseDir)(Code) | | Creates a ServerController with the directory for the MySQL server.
The 'datadir' is set to the same directory.
Parameters: baseDir - the base directory for the MySQL server. |
ServerController | public ServerController(String basedir, String datadir)(Code) | | Creates a server controller for the MySQL server with the given basedir
and datadir.
Parameters: basedir - the basedir to use when starting MySQL. Parameters: datadir - the datadir to use when starting MySQL. |
forceStop | public void forceStop()(Code) | | Forcefully terminates the server process (if started).
|
getServerProps | public synchronized Properties getServerProps()(Code) | | Returns the list of properties that will be used to start/control the
server.
Properties the list of properties. |
setBaseDir | public void setBaseDir(String baseDir)(Code) | | Sets the basedir to use when starting MySQL.
Parameters: baseDir - the basedir to use when starting MySQL. |
setDataDir | public void setDataDir(String dataDir)(Code) | | Sets the data to use when starting MySQL.
Parameters: dataDir - the basedir to use when starting MySQL. |
start | public Process start() throws IOException(Code) | | Starts the server, returning a java.lang.Process instance that represents
the mysql server.
Process a java.lang.Process instance representing the mysqlserver process. throws: IOException - if an error occurs while starting the mysql server. |
stop | public void stop(boolean forceIfNecessary) throws IOException(Code) | | Stops the server (if started)
Parameters: forceIfNecessary - use forceStop if mysqladmin doesn't shut the server down throws: IOException - if an error occurs while stopping the server |
|
|
|