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.

System

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.

  • addId(inputId)

    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().

  • addInteger(inputInteger)

    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().

  • addString(inputString)

    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().

  • build()

    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().

  • getMaxSize()

    Gets the maximum size of the queueable job signature in bytes.

  • getRemainingSize()

    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.

  • getSize()

    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)

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)

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