Class WorkerDeploymentVersion

java.lang.Object
io.temporal.common.WorkerDeploymentVersion

public class WorkerDeploymentVersion extends Object
Represents the version of a specific worker deployment.
  • Constructor Details

    • WorkerDeploymentVersion

      public WorkerDeploymentVersion(@Nonnull String deploymentName, @Nonnull String buildId)
      Build a worker deployment version from an explicit deployment name and build ID.
  • Method Details

    • fromCanonicalString

      public static WorkerDeploymentVersion fromCanonicalString(String canonicalString)
      Build a worker deployment version from a canonical string representation.
      Parameters:
      canonicalString - The canonical string representation of the worker deployment version, formatted as "deploymentName.buildId". Deployment name must not have a "." in it.
      Returns:
      A new instance of WorkerDeploymentVersion.
      Throws:
      IllegalArgumentException - if the input string is not in the expected format.
    • toCanonicalString

      public String toCanonicalString()
      Returns:
      The canonical string representation of this worker deployment version.
    • getDeploymentName

      @Nullable public String getDeploymentName()
      Returns:
      The name of the deployment.
    • getBuildId

      @Nullable public String getBuildId()
      Returns:
      The Build ID of this version.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object