Class RotationJob
java.lang.Object
co.ankatech.ankasecure.sdk.model.RotationJob
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
, andRotationJob.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
TheRotationJob.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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enumerates the finite set of job states. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RotationJob
public RotationJob()
-
-
Method Details
-
getJobId
-
getStatus
-
getOldKid
-
getNewKid
-
getScheduledAt
-
getStartedAt
-
getFinishedAt
-
setJobId
-
setStatus
-
setOldKid
-
setNewKid
-
setScheduledAt
-
setStartedAt
-
setFinishedAt
-