AustinData

Abandoned
Performs Asynchronous and Multi-Threaded MySQL Database Events.

AustinData is a plugin that handles MySQL events. It has been built for plugin developers that need a powerful database plugin that runs quick and doesn't lag the main thread on execution. A config file is included in the zip file, as you will need to insert your database information to avoid errors. Install just like most other plugins, just drag the extracted zip (AustinData folder and plugin) into the plugins directory of the server and restart/reload. AustinData will handle connecting and disconnecting to and from the database, leaving the actual MySQL transactions to you. All statements are prepared for you as well. You can include this in a package with your plugin.

Config Note:

Inside the config, there is a threads option, this is the amount of threads the plugin will run with, 10 is recommended, you can modify this all you want, just don't go too high (like 1000 or something).

Commands:

/transactions : The only in game command, prints the number of transactions that have occurred since server restart/reload.

Permissions:

austindata.transactions : This permission allows the user with it to use the /transactions command.

API For Developers:

First reference AustinData, like you would do with the Bukkit jar.

To execute a non returning query (Insert, Update, Etc) call the Database.executeQuery() method, An example :

 Database.executeQuery("INSERT INTO Block_Data VALUES ('Test' , 'Test' , 0 , 0 , 0 , 'world');");

To execute a returning query (Select, Etc) call the Database.executeQueryResult() method. Handling these events are slightly different as you need to pass it to a ResultSet before you can handle it, an example :

try {
	ResultSet set = Database.executeQueryResult("SELECT * FROM Block_Data WHERE 'world' ='world';").get();
	// Handle Result Set here.
	set.next();
	getLogger().info(set.getString("world"));
	set.close(); // Don't forget to close!
} catch (Exception e) { //Catch any syntax errors, etc.
	e.printStackTrace();
}

And if you want to get the transactions executed for the day call the AustinData.getTransactions() method.

If you have any suggestions, drop a comment.

The AustinData Team

profile avatar
  • 3
    Projects
  • 10.5K
    Downloads

More from _ForgeUser4826167

  • Annihilation project image

    Annihilation

    • 79.1K
    • Bukkit Plugins

    Annihilation Mini-Game Plugin. Allows you to play Annihilation the way you like!

    • 79.1K
    • December 11, 2013
    • Bukkit Plugins
  • FireProtect project image

    FireProtect

    • 991
    • Bukkit Plugins

    Blocks fire from spreading and destroying blocks.

    • 991
    • November 26, 2013
    • Bukkit Plugins
    • +1
  • FreezeAndMute project image

    FreezeAndMute

    • 9.1K
    • Bukkit Plugins

    FreezeAndMute

    • 9.1K
    • September 2, 2013
    • Bukkit Plugins
    • +3
  • Annihilation project image

    Annihilation

    • 79.1K
    • Bukkit Plugins

    Annihilation Mini-Game Plugin. Allows you to play Annihilation the way you like!

    • 79.1K
    • December 11, 2013
    • Bukkit Plugins
  • FireProtect project image

    FireProtect

    • 991
    • Bukkit Plugins

    Blocks fire from spreading and destroying blocks.

    • 991
    • November 26, 2013
    • Bukkit Plugins
    • +1
  • FreezeAndMute project image

    FreezeAndMute

    • 9.1K
    • Bukkit Plugins

    FreezeAndMute

    • 9.1K
    • September 2, 2013
    • Bukkit Plugins
    • +3