MysqldResource API includes the following methods:
void start(String threadName, Map
mysqldArgs);
Deploys and starts MySQL. The "threadName" string is used to name the thread which actually performs the execution of the MySQL command line. The map is the set of arguments and their values to be passed to the command line.
void shutdown();
Shuts down the MySQL instance managed by the MysqldResource object.
Map getServerOptions();
Returns a map of all the options and their current (or default, if not running) options available for the MySQL database.
boolean isRunning();
Returns true if the MySQL database is running.
boolean isReadyForConnections();
Returns true once the database reports that is ready for connections.
void setKillDelay(int millis);
The default “Kill Delay” is 30 seconds. This represents the amount of time to wait between the initial request to shutdown and issuing a “force kill” if the database has not shutdown by itself.
void addCompletionListenser(Runnable listener);
Allows for applications to be notified when the server process completes. Each ''listener'' will be fired off in its own thread.
String getVersion();
Returns the version of MySQL.
void setVersion(int MajorVersion, int
minorVersion, int patchLevel);
The standard distribution comes with only one version of MySQL packaged. However, it is possible to package multiple versions, and specify which version to use.
User Comments
Add your own comment.