QueueableDuplicateSignature.Builder Class
Build a unique signature for your queueable job using this inner builder class. The build() class method builds a QueueableDuplicateSignature object, with input from the addId(), addInteger(), and addString() methods. Use the DuplicateSignature property in the AsyncOptions class to store the queueable job signature. Enqueue your job by using the System.enqueueJob() with the AsyncOptions parameter.
This example builds the async job signature with UserId and the string MyQueueable.
This example builds the async job signature using ApexClass Id and the hash value of an sObject.
See Also
The following are methods for QueueableDuplicateSignature.Builder.
-
Adds an ID to build a unique signature for a queueable job. You can then enqueue the job by using the signature as the
AsyncOptionsparameter toSystem.enqueueJob(). -
Adds an integer to build a unique signature for a queueable job. You can then enqueue the job by using the signature as the
AsyncOptionsparameter toSystem.enqueueJob(). -
Adds a string to build a unique signature for a queueable job. You can then enqueue the job by using the signature as the
AsyncOptionsparameter toSystem.enqueueJob(). -
Builds a unique signature for a queueable job. You can then enqueue the job by using the signature as the
AsyncOptionsparameter toSystem.enqueueJob(). -
Gets the maximum size of the queueable job signature in bytes.
-
Gets the remaining size of the queueable job signature in bytes, after subtracting what is already used by the signature from the maximum allowed number.
-
Gets the size of the queueable job signature in bytes.
Adds an ID to build a unique signature for a queueable job. You can then enqueue the job by using the signature as the AsyncOptions parameter to System.enqueueJob().
public System.QueueableDuplicateSignature.Builder addId(Id id)
- inputId: Type: Id
Type: QueueableDuplicateSignature.Builder
Adds an integer to build a unique signature for a queueable job. You can then enqueue the job by using the signature as the AsyncOptions parameter to System.enqueueJob().
public System.QueueableDuplicateSignature.Builder addInteger(Integer i)
- inputInteger: Type: Integer
Type: QueueableDuplicateSignature.Builder
Adds a string to build a unique signature for a queueable job. You can then enqueue the job by using the signature as the AsyncOptions parameter to System.enqueueJob().
public System.QueueableDuplicateSignature.Builder addString(String s)
- inputString: Type: String
Type: QueueableDuplicateSignature.Builder
Builds a unique signature for a queueable job. You can then enqueue the job by using the signature as the AsyncOptions parameter to System.enqueueJob().
public System.QueueableDuplicateSignature build()
Type: QueueableDuplicateSignature Class
Gets the maximum size of the queueable job signature in bytes.
public Integer getMaxSize()
Type: Integer
Gets the remaining size of the queueable job signature in bytes, after subtracting what is already used by the signature from the maximum allowed number.
public Integer getRemainingSize()
Type: Integer
Gets the size of the queueable job signature in bytes.
public Integer getSize()
Type: Integer