Class ExecutionStatesPurge

java.lang.Object
org.gcube.vremanagement.executor.persistence.ExecutionStatesPurge

public abstract class ExecutionStatesPurge extends Object
Deletes once a day, in each Context where the service runs, the states of the executions older than RETENTION, except the last state of each task. The history of the executions stays in the accounting, as one JobUsageRecord per execution.
Author:
Luca Frosini (ISTI - CNR)
  • Field Details

    • RETENTION

      public static final Duration RETENTION
      How long the states of the executions are kept.
    • PERIOD

      protected static final Duration PERIOD
    • FIRST_DELAY

      protected static final Duration FIRST_DELAY
  • Constructor Details

    • ExecutionStatesPurge

      public ExecutionStatesPurge()
  • Method Details

    • start

      public static void start(org.gcube.common.security.secrets.Secret secret)
      Starts the daily purge of a Context.
      Parameters:
      secret - the secret of the node in the Context
    • stop

      public static void stop(String context)
      Stops the daily purge of a Context.
      Parameters:
      context - the Context
    • purge

      protected static void purge(org.gcube.common.security.secrets.Secret secret)