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

com.hubspot.singularity.data.usage.TaskUsageManager Maven / Gradle / Ivy

package com.hubspot.singularity.data.usage;

import com.hubspot.singularity.SingularityTaskId;
import com.hubspot.singularity.SingularityTaskUsage;
import java.util.Comparator;
import java.util.List;

public interface TaskUsageManager {
  Comparator TASK_USAGE_COMPARATOR_TIMESTAMP_ASC = Comparator.comparingDouble(
    SingularityTaskUsage::getTimestamp
  );

  void deleteTaskUsage(SingularityTaskId taskId);

  void deleteSpecificTaskUsage(SingularityTaskId taskId, long timestamp);

  void saveSpecificTaskUsage(SingularityTaskId taskId, SingularityTaskUsage usage);

  List getTaskUsage(SingularityTaskId taskId);

  int countTasksWithUsage();

  void cleanOldUsages(List activeTaskIds);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy