Class TokenClaimQueryResult

  • All Implemented Interfaces:
    java.io.Externalizable , java.io.Serializable , java.lang.Comparable , org.apache.avro.generic.GenericContainer , org.apache.avro.generic.GenericRecord , org.apache.avro.generic.IndexedRecord , org.apache.avro.specific.SpecificRecord

    
    public class TokenClaimQueryResult
    extends SpecificRecordBase implements SpecificRecord
                        

    Represents the result of a claim query, sent back to the flow

    • Constructor Detail

      • TokenClaimQueryResult

        TokenClaimQueryResult()
        Default constructor.
      • TokenClaimQueryResult

        TokenClaimQueryResult(TokenPoolCacheKey poolKey, String claimId, TokenClaimResultStatus resultType, List<Token> claimedTokens)
        All-args constructor.
        Parameters:
        poolKey - Key for the pool the tokens were claimed from
        claimId - Unique identifier for the claim
        resultType - The type of result for the claim query
        claimedTokens - The new value for claimedTokens
    • Method Detail

      • getPoolKey

         TokenPoolCacheKey getPoolKey()

        Gets the value of the 'poolKey' field.

        Returns:

        Key for the pool the tokens were claimed from

      • setPoolKey

         void setPoolKey(TokenPoolCacheKey value)

        Sets the value of the 'poolKey' field. Key for the pool the tokens were claimed from

        Parameters:
        value - the value to set.
      • getClaimId

         String getClaimId()

        Gets the value of the 'claimId' field.

        Returns:

        Unique identifier for the claim

      • setClaimId

         void setClaimId(String value)

        Sets the value of the 'claimId' field. Unique identifier for the claim

        Parameters:
        value - the value to set.
      • setResultType

         void setResultType(TokenClaimResultStatus value)

        Sets the value of the 'resultType' field. The type of result for the claim query

        Parameters:
        value - the value to set.
      • getClaimedTokens

         List<Token> getClaimedTokens()

        Gets the value of the 'claimedTokens' field.

        Returns:

        The value of the 'claimedTokens' field.

      • setClaimedTokens

         void setClaimedTokens(List<Token> value)

        Sets the value of the 'claimedTokens' field.

        Parameters:
        value - the value to set.
      • getEncoder

         static BinaryMessageEncoder<TokenClaimQueryResult> getEncoder()

        Return the BinaryMessageEncoder instance used by this class.

        Returns:

        the message encoder used by this class

      • getDecoder

         static BinaryMessageDecoder<TokenClaimQueryResult> getDecoder()

        Return the BinaryMessageDecoder instance used by this class.

        Returns:

        the message decoder used by this class

      • createDecoder

         static BinaryMessageDecoder<TokenClaimQueryResult> createDecoder(SchemaStore resolver)

        Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.

        Parameters:
        resolver - a SchemaStore used to find schemas by fingerprint
        Returns:

        a BinaryMessageDecoder instance for this class backed by the given SchemaStore

      • toByteBuffer

         ByteBuffer toByteBuffer()

        Serializes this TokenClaimQueryResult to a ByteBuffer.

        Returns:

        a buffer holding the serialized data for this instance

      • fromByteBuffer

         static TokenClaimQueryResult fromByteBuffer(ByteBuffer b)

        Deserializes a TokenClaimQueryResult from a ByteBuffer.

        Parameters:
        b - a byte buffer holding serialized data for an instance of this class
        Returns:

        a TokenClaimQueryResult instance decoded from the given buffer