Class Maintenance

java.lang.Object
org.bgerp.app.dist.Maintenance

public class Maintenance extends Object
Maintenance application' state. Blocking logging in and logging off users before the app's restart.
  • Method Details

    • instance

      public static Maintenance instance()
      Returns:
      the current maintenance instance or null, if its missing.
    • start

      public static Maintenance start(User user, Duration logoffDelay)
      Starts maintenance.
      Parameters:
      user - the user.
      logoffDelay - delay before logging users off.
      Returns:
      the created maintenance instance.
      Throws:
      IllegalStateException - if maintenance is already running.
    • cancel

      public static Maintenance cancel()
      Cancels maintenance.
      Returns:
      the cancelled maintenance instance.
    • getUser

      public User getUser()
    • getStartTime

      public LocalDateTime getStartTime()
    • getLogoffTime

      public LocalDateTime getLogoffTime()