| Modifier and Type | Field and Description |
|---|---|
| public static final String | BASEDIR_KEY
Where is the server installed? |
| public static final String | DATADIR_KEY
Where are the databases installed? |
| public static final String | DEFAULTS_FILE_KEY
Where is the config file located? |
| public static final String | EXECUTABLE_NAME_KEY
What is the name of the executable to run? |
| public static final String | EXECUTABLE_PATH_KEY
What is the path to the mysql server executable (if not standard?) |
| private Process | serverProcess
The process representing the MySQL server |
| private Properties | serverProps
The list of properties for this server |
| Access | Constructor and Description |
|---|---|
| public | ServerController(String
the base directory for the MySQL server. baseDir)Creates a ServerController with the directory for the MySQL server. |
| public | ServerController(String
the basedir to use when starting MySQL. basedir, String the datadir to use when starting MySQL. datadir)Creates a server controller for the MySQL server with the given basedir and datadir. |
| Modifier and Type | Method and Description |
|---|---|
| private String | Returns: String the list of command-line arguments.Builds the list of command-line arguments that will be passed to the mysql server to be started. |
| public void | |
| private String | Returns: String the commandline used to start the mysql server.Returns the full commandline used to start the mysql server, including and arguments to be passed to the server process. |
| private String | Returns: String the path to the server executable.Returns the fully-qualifed path to the 'mysqld' executable |
| public synchronized Properties | Returns: Properties the list of properties.Returns the list of properties that will be used to start/control the server. |
| private boolean | Returns: boolean if the property should not be a command-line argument.property name propName)Returns true if the property does not belong as a command-line argument |
| private boolean | Returns: boolean if this ServerController is running on WindowsIs this ServerController running on a Windows operating system? |
| public void | setBaseDir(String
the basedir to use when starting MySQL. baseDir)Sets the basedir to use when starting MySQL. |
| public void | setDataDir(String
the basedir to use when starting MySQL. dataDir)Sets the data to use when starting MySQL. |
| public Process | Returns: Process a java.lang.Process instance representing the mysql server process.Starts the server, returning a java.lang.Process instance that represents the mysql server. |
| public void | stop(boolean
use forceStop if mysqladmin doesn't shut the server down forceIfNecessary)Stops the server (if started) |
| BASEDIR_KEY | back to summary |
|---|---|
| public static final String BASEDIR_KEY Where is the server installed? | |
| DATADIR_KEY | back to summary |
|---|---|
| public static final String DATADIR_KEY Where are the databases installed? | |
| DEFAULTS_FILE_KEY | back to summary |
|---|---|
| public static final String DEFAULTS_FILE_KEY Where is the config file located? | |
| EXECUTABLE_NAME_KEY | back to summary |
|---|---|
| public static final String EXECUTABLE_NAME_KEY What is the name of the executable to run? | |
| EXECUTABLE_PATH_KEY | back to summary |
|---|---|
| public static final String EXECUTABLE_PATH_KEY What is the path to the mysql server executable (if not standard?) | |
| serverProcess | back to summary |
|---|---|
| private Process serverProcess The process representing the MySQL server | |
| serverProps | back to summary |
|---|---|
| private Properties serverProps The list of properties for this server | |
| ServerController | back to summary |
|---|---|
| public ServerController(String baseDir) Creates a ServerController with the directory for the MySQL server. The 'datadir' is set to the same directory.
| |
| ServerController | back to summary |
|---|---|
| public ServerController(String basedir, String datadir) Creates a server controller for the MySQL server with the given basedir and datadir. | |
| buildOptionalCommandLine | back to summary |
|---|---|
| private String buildOptionalCommandLine() Builds the list of command-line arguments that will be passed to the mysql server to be started.
| |
| forceStop | back to summary |
|---|---|
| public void forceStop() Forcefully terminates the server process (if started). | |
| getCommandLine | back to summary |
|---|---|
| private String getCommandLine() Returns the full commandline used to start the mysql server, including and arguments to be passed to the server process.
| |
| getFullExecutablePath | back to summary |
|---|---|
| private String getFullExecutablePath() Returns the fully-qualifed path to the 'mysqld' executable
| |
| getServerProps | back to summary |
|---|---|
| public synchronized Properties getServerProps() Returns the list of properties that will be used to start/control the server.
| |
| isNonCommandLineArgument | back to summary |
|---|---|
| private boolean isNonCommandLineArgument(String propName) Returns true if the property does not belong as a command-line argument
| |
| runningOnWindows | back to summary |
|---|---|
| private boolean runningOnWindows() Is this ServerController running on a Windows operating system?
| |
| setBaseDir | back to summary |
|---|---|
| public void setBaseDir(String baseDir) Sets the basedir to use when starting MySQL.
| |
| setDataDir | back to summary |
|---|---|
| public void setDataDir(String dataDir) Sets the data to use when starting MySQL.
| |
| start | back to summary |
|---|---|
| public Process start() throws IOException Starts the server, returning a java.lang.Process instance that represents the mysql server.
| |
| stop | back to summary |
|---|---|
| public void stop(boolean forceIfNecessary) throws IOException Stops the server (if started)
| |