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.void
importData
(String fileName) Import player data from a file.void
init()
Initialize the storage system.Load a player data object from the storage system.void
save
(PlayerData playerData) Save a player data object to the storage system.protected void
saveAchievements
(Connection connection, PlayerData playerData) void
Save all cached data to the storage system.protected void
saveUpgrades
(Connection connection, PlayerData playerData) Methods inherited from class com.zetaplugins.cookieclickerz.storage.SQLStorage
export, getAllPlayers, loadAchievements, loadPlayerData, loadUpgrades
Methods 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:Storage
Initialize the storage system. -
save
Description copied from class:Storage
Save a player data object to the storage system. -
saveUpgrades
- Throws:
SQLException
-
saveAchievements
- Throws:
SQLException
-
load
Description copied from class:Storage
Load a player data object from the storage system. -
importData
Description copied from class:Storage
Import player data from a file.- Specified by:
importData
in classStorage
- Parameters:
fileName
- The name of the file to import from.
-
getTopCookiesPlayers
Description copied from class:Storage
Get a List of the top players by total cookies.- Specified by:
getTopCookiesPlayers
in 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:Storage
Get a List of the top players by cookies per click.- Specified by:
getTopCpcPlayers
in 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:Storage
Save all cached data to the storage system.- Specified by:
saveAllCachedData
in classStorage
-