Class Autosaver

java.lang.Object
com.xpdustry.claj.server.util.Autosaver

public class Autosaver extends Object
Save periodically the registered Autosaver.Saveables and also when the application exit.
  • Field Details

  • Constructor Details

    • Autosaver

      public Autosaver()
  • Method Details

    • init

      public static void init(arc.Application app)
      Init the auto-saver to run a save every seconds.
    • add

      public static void add(Autosaver.Saveable saveable)
      Adds to the normal priority.
    • add

      public static void add(Autosaver.Saveable saveable, Autosaver.Priority priority)
    • remove

      public static void remove(Autosaver.Saveable saveable)
    • clear

      public static void clear()
      Don't do that!
    • clear

      public static void clear(Autosaver.Priority priority)
      Don't do that!
    • has

      public static boolean has(Autosaver.Saveable saveable)
    • has

      public static boolean has(Autosaver.Saveable saveable, Autosaver.Priority priority)
    • priorityOf

      public static Autosaver.Priority priorityOf(Autosaver.Saveable saveable)
    • saveNeeded

      public static boolean saveNeeded()
    • save

      public static boolean save()
      Save all registered things now, only if modified.
    • forceSave

      public static boolean forceSave()
      Save all registered things now, even not modified.