Class ImmutableProcessMetadataValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.deployment.ImmutableProcessMetadataValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,ProcessMetadataValue,TenantOwned
Immutable implementation of
ProcessMetadataValue.
Use the builder to create immutable instances:
ImmutableProcessMetadataValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableProcessMetadataValue. -
Field Summary
Fields inherited from interface io.camunda.zeebe.protocol.record.value.TenantOwned
DEFAULT_TENANT_IDENTIFIER -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableProcessMetadataValue.copyOf(ProcessMetadataValue instance) Creates an immutable copy of aProcessMetadataValuevalue.booleanThis instance is equal to all instances ofImmutableProcessMetadataValuethat have equal attribute values.byte[]longlongReturns the identifier of the tenant that owns this entity.intinthashCode()Returns a lazily computed hash code from attributes:tenantId,bpmnProcessId,version,versionTag,processDefinitionKey,resourceName,checksum,duplicate,deploymentKey.booleanreturn true if the process is a duplicate (and has been deployed previously), false otherwisetoString()Prints the immutable valueProcessMetadataValuewith attribute values.withBpmnProcessId(String value) Copy the current immutable object by setting a value for thebpmnProcessIdattribute.withChecksum(byte... elements) Copy the current immutable object with elements that replace the content ofchecksum.withDeploymentKey(long value) Copy the current immutable object by setting a value for thedeploymentKeyattribute.withDuplicate(boolean value) Copy the current immutable object by setting a value for theduplicateattribute.withProcessDefinitionKey(long value) Copy the current immutable object by setting a value for theprocessDefinitionKeyattribute.withResourceName(String value) Copy the current immutable object by setting a value for theresourceNameattribute.withTenantId(String value) Copy the current immutable object by setting a value for thetenantIdattribute.withVersion(int value) Copy the current immutable object by setting a value for theversionattribute.withVersionTag(String value) Copy the current immutable object by setting a value for theversionTagattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.camunda.zeebe.protocol.record.JsonSerializable
toJson
-
Method Details
-
getTenantId
Returns the identifier of the tenant that owns this entity.- Specified by:
getTenantIdin interfaceTenantOwned
-
getBpmnProcessId
- Specified by:
getBpmnProcessIdin interfaceProcessMetadataValue- Returns:
- the bpmn process ID of this process
-
getVersion
public int getVersion()- Specified by:
getVersionin interfaceProcessMetadataValue- Returns:
- the version of this process
-
getVersionTag
- Specified by:
getVersionTagin interfaceProcessMetadataValue- Returns:
- the custom version tag of this process
-
getProcessDefinitionKey
public long getProcessDefinitionKey()- Specified by:
getProcessDefinitionKeyin interfaceProcessMetadataValue- Returns:
- the key of this process
-
getResourceName
- Specified by:
getResourceNamein interfaceProcessMetadataValue- Returns:
- the name of the resource through which this process was deployed
-
getChecksum
public byte[] getChecksum()- Specified by:
getChecksumin interfaceProcessMetadataValue- Returns:
- the checksum of the process (MD5)
-
isDuplicate
public boolean isDuplicate()return true if the process is a duplicate (and has been deployed previously), false otherwise- Specified by:
isDuplicatein interfaceProcessMetadataValue
-
getDeploymentKey
public long getDeploymentKey()- Specified by:
getDeploymentKeyin interfaceProcessMetadataValue- Returns:
- the key of the deployment this process was deployed with
-
withTenantId
Copy the current immutable object by setting a value for thetenantIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tenantId (can benull)- Returns:
- A modified copy of the
thisobject
-
withBpmnProcessId
Copy the current immutable object by setting a value for thebpmnProcessIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bpmnProcessId (can benull)- Returns:
- A modified copy of the
thisobject
-
withVersion
Copy the current immutable object by setting a value for theversionattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for version- Returns:
- A modified copy of the
thisobject
-
withVersionTag
Copy the current immutable object by setting a value for theversionTagattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for versionTag (can benull)- Returns:
- A modified copy of the
thisobject
-
withProcessDefinitionKey
Copy the current immutable object by setting a value for theprocessDefinitionKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for processDefinitionKey- Returns:
- A modified copy of the
thisobject
-
withResourceName
Copy the current immutable object by setting a value for theresourceNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for resourceName (can benull)- Returns:
- A modified copy of the
thisobject
-
withChecksum
Copy the current immutable object with elements that replace the content ofchecksum. The array is cloned before being saved as attribute values.- Parameters:
elements- The non-null elements for checksum- Returns:
- A modified copy of
thisobject
-
withDuplicate
Copy the current immutable object by setting a value for theduplicateattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for duplicate- Returns:
- A modified copy of the
thisobject
-
withDeploymentKey
Copy the current immutable object by setting a value for thedeploymentKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deploymentKey- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableProcessMetadataValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:tenantId,bpmnProcessId,version,versionTag,processDefinitionKey,resourceName,checksum,duplicate,deploymentKey. -
toString
Prints the immutable valueProcessMetadataValuewith attribute values. -
copyOf
Creates an immutable copy of aProcessMetadataValuevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable ProcessMetadataValue instance
-
builder
Creates a builder forImmutableProcessMetadataValue.ImmutableProcessMetadataValue.builder() .withTenantId(String | null) // nullabletenantId.withBpmnProcessId(String | null) // nullablebpmnProcessId.withVersion(int) // optionalversion.withVersionTag(String | null) // nullableversionTag.withProcessDefinitionKey(long) // optionalprocessDefinitionKey.withResourceName(String | null) // nullableresourceName.withChecksum(byte[] | null) // nullablechecksum.withDuplicate(boolean) // optionalduplicate.withDeploymentKey(long) // optionaldeploymentKey.build();- Returns:
- A new ImmutableProcessMetadataValue builder
-