Class RotationJob

java.lang.Object
co.ankatech.ankasecure.sdk.model.RotationJob

public final class RotationJob extends Object
Represents a job in the key rotation process, including its state, key identifiers, and timestamps. This class models the lifecycle of a rotation job with attributes to track its current status, the keys involved, and various timestamps (scheduled, started, finished). The possible states of the rotation job are defined within the RotationJob.Status enumeration.

Attributes

  • jobId: An identifier that uniquely represents the rotation job.
  • status: Represents the current status of the job. Valid states are RotationJob.Status.QUEUED, RotationJob.Status.RUNNING, RotationJob.Status.SUCCEEDED, and RotationJob.Status.FAILED.
  • oldKid: The key identifier that is being rotated out.
  • newKid: The key identifier that is being rotated in.
  • scheduledAt: The timestamp when the job is scheduled to be executed.
  • startedAt: The timestamp when the job begins execution.
  • finishedAt: The timestamp when the job finishes execution.

Thread-Safety

This class is not thread-safe. It provides both getters and setters, but setters are package-private and intended for internal use only.

Status Enumeration

The RotationJob.Status enumeration defines four distinct states a rotation job can occupy:
  • QUEUED: The job is pending execution.
  • RUNNING: The job is currently executing.
  • SUCCEEDED: The job completed successfully.
  • FAILED: The job failed to complete successfully.
Setters in this class are meant to be used internally within package scope and are not intended for external modification of the object's state. Getters provide read access to the attributes.
  • Constructor Details

    • RotationJob

      public RotationJob()
  • Method Details