Class SaveThread

java.lang.Object
org.omegat.core.threads.SaveThread
All Implemented Interfaces:
IAutoSave

public class SaveThread extends Object implements IAutoSave
An independent stream to save project, created in order not to freese UI while project is saved (may take a lot)
  • Constructor Details

    • SaveThread

      public SaveThread()
  • Method Details

    • disable

      public void disable()
      Description copied from interface: IAutoSave
      Disable autosaving. Required when project loading or saving time. When project closed, autosaving also disabled.
      Specified by:
      disable in interface IAutoSave
    • enable

      public void enable()
      Description copied from interface: IAutoSave
      Enable autosaving.
      Specified by:
      enable in interface IAutoSave
    • fin

      public void fin()
      Description copied from interface: IAutoSave
      Terminates 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.

      Specified by:
      fin in interface IAutoSave