Interface TokenClaim

  • All Implemented Interfaces:

    @DoNotImplement() 
    public interface TokenClaim
    
                        

    Defines a claimed set of tokens returned by a call to tryClaim.

    The claimed ClaimedToken list is exclusively locked by the flow that made the claim and are unavailable to any other flows. Any unconsumed token that has been claimed by the flow is released and made available to other flows once the flow terminates either successfully or unsuccessfully.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract List<ClaimedToken> getClaimedTokens() Gets a list of claimed tokens.
      abstract void useAndRelease(@NotNull() List<StateRef> usedTokensRefs) Removes any used tokens from the cache and unlocks any remaining tokens for other flows to claim.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • useAndRelease

        @Suspendable()@Deprecated(since = "5.1", forRemoval = true) abstract void useAndRelease(@NotNull() List<StateRef> usedTokensRefs)

        Removes any used tokens from the cache and unlocks any remaining tokens for other flows to claim. This method is now deprecated. Claimed tokens are now managed differently which makes the method irrelevant. From release 5.1, nothing will happen if the method is called.

        Parameters:
        usedTokensRefs - The List of StateRefs to mark as used.