Class MySQLStorage
java.lang.Object
com.zetaplugins.cookieclickerz.storage.Storage
com.zetaplugins.cookieclickerz.storage.SQLStorage
com.zetaplugins.cookieclickerz.storage.MySQLStorage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetTopCookiesPlayers(int limit) Get a List of the top players by total cookies.getTopCpcPlayers(int limit) Get a List of the top players by cookies per click.voidimportData(String fileName) Import player data from a file.voidinit()Initialize the storage system.Load a player data object from the storage system.voidsave(PlayerData playerData) Save a player data object to the storage system.protected voidsaveAchievements(Connection connection, PlayerData playerData) voidSave all cached data to the storage system.protected voidsaveUpgrades(Connection connection, PlayerData playerData) Methods inherited from class com.zetaplugins.cookieclickerz.storage.SQLStorage
export, getAllPlayers, loadAchievements, loadPlayerData, loadUpgradesMethods inherited from class com.zetaplugins.cookieclickerz.storage.Storage
getMaxCacheSize, getPlugin, load, shouldUsePlayerCache
-
Constructor Details
-
MySQLStorage
-
-
Method Details
-
getConnectionPool
-
init
public void init()Description copied from class:StorageInitialize the storage system. -
save
Description copied from class:StorageSave a player data object to the storage system. -
saveUpgrades
- Throws:
SQLException
-
saveAchievements
- Throws:
SQLException
-
load
Description copied from class:StorageLoad a player data object from the storage system. -
importData
Description copied from class:StorageImport player data from a file.- Specified by:
importDatain classStorage- Parameters:
fileName- The name of the file to import from.
-
getTopCookiesPlayers
Description copied from class:StorageGet a List of the top players by total cookies.- Specified by:
getTopCookiesPlayersin classStorage- Parameters:
limit- The maximum number of players to return.- Returns:
- A List of the top players. PlayerData does not contain achievements and upgrades.
-
getTopCpcPlayers
Description copied from class:StorageGet a List of the top players by cookies per click.- Specified by:
getTopCpcPlayersin classStorage- Parameters:
limit- The maximum number of players to return.- Returns:
- A List of the top players. PlayerData does not contain achievements and upgrades.
-
saveAllCachedData
public void saveAllCachedData()Description copied from class:StorageSave all cached data to the storage system.- Specified by:
saveAllCachedDatain classStorage
-