Package io.temporal.common
Class WorkerDeploymentVersion
- java.lang.Object
-
- io.temporal.common.WorkerDeploymentVersion
-
public class WorkerDeploymentVersion extends java.lang.ObjectRepresents the version of a specific worker deployment.
-
-
Constructor Summary
Constructors Constructor Description WorkerDeploymentVersion(java.lang.String deploymentName, java.lang.String buildId)Build a worker deployment version from an explicit deployment name and build ID.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)static WorkerDeploymentVersionfromCanonicalString(java.lang.String canonicalString)Build a worker deployment version from a canonical string representation.java.lang.StringgetBuildId()java.lang.StringgetDeploymentName()inthashCode()java.lang.StringtoCanonicalString()java.lang.StringtoString()
-
-
-
Method Detail
-
fromCanonicalString
public static WorkerDeploymentVersion fromCanonicalString(java.lang.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:
java.lang.IllegalArgumentException- if the input string is not in the expected format.
-
toCanonicalString
public java.lang.String toCanonicalString()
- Returns:
- The canonical string representation of this worker deployment version.
-
getDeploymentName
@Nullable public java.lang.String getDeploymentName()
- Returns:
- The name of the deployment.
-
getBuildId
@Nullable public java.lang.String getBuildId()
- Returns:
- The Build ID of this version.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-