Class PixelmonStorageAsyncScheduler
java.lang.Object
com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler
- All Implemented Interfaces:
- StorageSaveScheduler
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final ScheduledExecutorServiceprotected final Deque<PokemonStorage>protected final AtomicBoolean
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidflush()Gets the executor that is used to schedule saving logicvoidonServerStopping(net.minecraftforge.event.server.ServerStoppingEvent event) Called from thePixelmonclass when the server stopping event is fired.voidvoidsave(PokemonStorage storage) Saves the storage using theStorageProxy.getSaveAdapter()
- 
Field Details- 
executor
- 
saveList
- 
saving
 
- 
- 
Constructor Details- 
PixelmonStorageAsyncSchedulerpublic PixelmonStorageAsyncScheduler()
 
- 
- 
Method Details- 
saveDescription copied from interface:StorageSaveSchedulerSaves the storage using theStorageProxy.getSaveAdapter()- Specified by:
- savein interface- StorageSaveScheduler
- Parameters:
- storage- The storage to save
 
- 
getSchedulerDescription copied from interface:StorageSaveSchedulerGets the executor that is used to schedule saving logic- Specified by:
- getSchedulerin interface- StorageSaveScheduler
- Returns:
- The executor
 
- 
onServerStoppingpublic void onServerStopping(net.minecraftforge.event.server.ServerStoppingEvent event) Description copied from interface:StorageSaveSchedulerCalled from thePixelmonclass when the server stopping event is fired. This is mandatory as otherwise data may be lost on server shutdown- Specified by:
- onServerStoppingin interface- StorageSaveScheduler
- Parameters:
- event- Shutdown event
 
- 
queueChangedStoragespublic void queueChangedStorages()
- 
flushpublic void flush()
 
-