public class DataCacheSaveQueue extends Object
Constructor and Description |
---|
DataCacheSaveQueue(Plan plugin,
DataCacheClearQueue clear)
Class constructor, starts the new Thread for saving.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsUUID(UUID uuid)
Check whether or not the queue contains a UserData object with the uuid.
|
void |
scheduleForSave(Collection<UserData> data)
Schedule multiple UserData objects to be saved to the database.
|
void |
scheduleForSave(UserData data)
Schedule UserData object to be saved to the database.
|
void |
scheduleNewPlayer(UserData data)
Schedule UserData object for a new player to be saved to the database.
|
void |
stop()
Stops all activites and clears the queue.
|
public DataCacheSaveQueue(Plan plugin, DataCacheClearQueue clear)
plugin
- current instance of Planclear
- current instance of the Clear task to schedule clear if
UserData.clearAfterSave() is truepublic void scheduleForSave(UserData data)
data
- UserData object.public void scheduleForSave(Collection<UserData> data)
data
- Collection of UserData objects.public void scheduleNewPlayer(UserData data)
data
- UserData object.public boolean containsUUID(UUID uuid)
uuid
- UUID of the player.public void stop()
Copyright © 2017. All rights reserved.