Package org.omegat.core.threads
Class SaveThread
java.lang.Object
org.omegat.core.threads.SaveThread
- All Implemented Interfaces:
IAutoSave
An independent stream to save project, created in order not to freese UI
while project is saved (may take a lot)
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SaveThread
public SaveThread()
-
-
Method Details
-
disable
public void disable()Description copied from interface:IAutoSaveDisable autosaving. Required when project loading or saving time. When project closed, autosaving also disabled. -
enable
public void enable()Description copied from interface:IAutoSaveEnable autosaving. -
fin
public void fin()Description copied from interface:IAutoSaveTerminates the thread execution and releases associated resources.This method signals the thread to stop by setting the running flag to false and ensures that all waiting threads are notified. A notification is sent on the lock object to release any threads waiting on it. Afterward, it attempts to join the thread, waiting a duration based on the wait interval to allow the thread completion. If the join is interrupted, the interrupt status is restored.
-