Class ImmutableJobBatchRecordValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableJobBatchRecordValue.Builder
- Enclosing class:
ImmutableJobBatchRecordValue
Builds instances of type
ImmutableJobBatchRecordValue.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllJobBuilders(ImmutableJobRecordValue.Builder... elements) Adds elements tojobslist.Adds elements tojobslist.addAllJobKeys(Iterable<? extends Long> elements) Adds elements tojobKeyslist.addAllJobs(Iterable<? extends JobRecordValue> elements) Adds elements tojobslist.addAllTenantIds(Iterable<String> elements) Adds elements totenantIdslist.addJob(JobRecordValue element) Adds one element tojobslist.Adds a new builder to thejobslist and returns the builder.Adds one element tojobKeyslist.addJobKeys(Long... elements) Adds elements tojobKeyslist.addJobs(JobRecordValue... elements) Adds elements tojobslist.addTenantId(String element) Adds one element totenantIdslist.addTenantIds(String... elements) Adds elements totenantIdslist.build()Builds a newImmutableJobBatchRecordValue.clear()Clear the builder to the initial state.from(JobBatchRecordValue instance) Fill a builder with attribute values from the providedJobBatchRecordValueinstance.Gets the builder elements tojobslist.withJobKeys(Iterable<? extends Long> elements) Sets or replaces all elements forjobKeyslist.withJobs(Iterable<? extends JobRecordValue> elements) Sets or replaces all elements forjobslist.withMaxJobsToActivate(int maxJobsToActivate) Initializes the value for themaxJobsToActivateattribute.withTenantIds(Iterable<String> elements) Sets or replaces all elements fortenantIdslist.withTimeout(long timeout) Initializes the value for thetimeoutattribute.withTruncated(boolean truncated) Initializes the value for thetruncatedattribute.Initializes the value for thetypeattribute.withWorker(String worker) Initializes the value for theworkerattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedJobBatchRecordValueinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
withType
Initializes the value for thetypeattribute.- Parameters:
type- The value for type (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withWorker
Initializes the value for theworkerattribute.- Parameters:
worker- The value for worker (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withTimeout
Initializes the value for thetimeoutattribute.- Parameters:
timeout- The value for timeout- Returns:
thisbuilder for use in a chained invocation
-
withMaxJobsToActivate
Initializes the value for themaxJobsToActivateattribute.- Parameters:
maxJobsToActivate- The value for maxJobsToActivate- Returns:
thisbuilder for use in a chained invocation
-
addJobKey
Adds one element tojobKeyslist.- Parameters:
element- A jobKeys element- Returns:
thisbuilder for use in a chained invocation
-
addJobKeys
Adds elements tojobKeyslist.- Parameters:
elements- An array of jobKeys elements- Returns:
thisbuilder for use in a chained invocation
-
withJobKeys
Sets or replaces all elements forjobKeyslist.- Parameters:
elements- An iterable of jobKeys elements- Returns:
thisbuilder for use in a chained invocation
-
addAllJobKeys
Adds elements tojobKeyslist.- Parameters:
elements- An iterable of jobKeys elements- Returns:
thisbuilder for use in a chained invocation
-
addJob
Adds one element tojobslist.- Parameters:
element- A jobs element- Returns:
thisbuilder for use in a chained invocation
-
addJobs
Adds elements tojobslist.- Parameters:
elements- An array of jobs elements- Returns:
thisbuilder for use in a chained invocation
-
addJobBuilder
Adds a new builder to thejobslist and returns the builder. -
addAllJobBuilders
public final ImmutableJobBatchRecordValue.Builder addAllJobBuilders(ImmutableJobRecordValue.Builder... elements) Adds elements tojobslist.- Parameters:
elements- An array of jobs builder elements- Returns:
thisbuilder for use in a chained invocation
-
jobBuilders
Gets the builder elements tojobslist.- Returns:
thisunmodifiable list of modifiable builders.
-
withJobs
public final ImmutableJobBatchRecordValue.Builder withJobs(Iterable<? extends JobRecordValue> elements) Sets or replaces all elements forjobslist.- Parameters:
elements- An iterable of jobs elements- Returns:
thisbuilder for use in a chained invocation
-
addAllJobs
public final ImmutableJobBatchRecordValue.Builder addAllJobs(Iterable<? extends JobRecordValue> elements) Adds elements tojobslist.- Parameters:
elements- An iterable of jobs elements- Returns:
thisbuilder for use in a chained invocation
-
addAllJobBuilders
public final ImmutableJobBatchRecordValue.Builder addAllJobBuilders(Iterable<ImmutableJobRecordValue.Builder> elements) Adds elements tojobslist.- Parameters:
elements- An iterable of jobs builder elements- Returns:
thisbuilder for use in a chained invocation
-
withTruncated
Initializes the value for thetruncatedattribute.- Parameters:
truncated- The value for truncated- Returns:
thisbuilder for use in a chained invocation
-
addTenantId
Adds one element totenantIdslist.- Parameters:
element- A tenantIds element- Returns:
thisbuilder for use in a chained invocation
-
addTenantIds
Adds elements totenantIdslist.- Parameters:
elements- An array of tenantIds elements- Returns:
thisbuilder for use in a chained invocation
-
withTenantIds
Sets or replaces all elements fortenantIdslist.- Parameters:
elements- An iterable of tenantIds elements- Returns:
thisbuilder for use in a chained invocation
-
addAllTenantIds
Adds elements totenantIdslist.- Parameters:
elements- An iterable of tenantIds elements- Returns:
thisbuilder for use in a chained invocation
-
clear
Clear the builder to the initial state.- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableJobBatchRecordValue.- Returns:
- An immutable instance of JobBatchRecordValue
- Throws:
IllegalStateException- if any required attributes are missing
-