All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kz.greetgo.scheduling.TaskRunStatus Maven / Gradle / Ivy

There is a newer version: 3.1.1
Show newest version
package kz.greetgo.scheduling;

import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

public class TaskRunStatus {

  public final AtomicLong schedulerStartedAt = new AtomicLong(0);

  public final AtomicLong lastStartedAt = new AtomicLong(0);

  public final AtomicLong lastFinishedAt = new AtomicLong(0);

  public final AtomicInteger inRuntimeCount = new AtomicInteger(0);

  public void markStarted() {
    lastStartedAt.set(System.currentTimeMillis());
    inRuntimeCount.incrementAndGet();
  }

  public void markFinished() {
    lastFinishedAt.set(System.currentTimeMillis());
    inRuntimeCount.decrementAndGet();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy