Interface ClaimCheckRepository

  • All Superinterfaces:
    AutoCloseable, Service

    public interface ClaimCheckRepository
    extends Service
    Access to a repository of keys to implement the Claim Check pattern.

    The add and contains methods is operating according to the Map contract, and the push and pop methods is operating according to the Stack contract.

    See important details about the Claim Check EIP implementation in Apache Camel at org.apache.camel.processor.ClaimCheckProcessor.

    • Method Detail

      • add

        boolean add​(String key,
                    Exchange exchange)
        Adds the exchange to the repository.
        Parameters:
        key - the claim check key
        Returns:
        true if this repository did not already contain the specified key
      • contains

        boolean contains​(String key)
        Returns true if this repository contains the specified key.
        Parameters:
        key - the claim check key
        Returns:
        true if this repository contains the specified key
      • get

        Exchange get​(String key)
        Gets the exchange from the repository.
        Parameters:
        key - the claim check key
      • getAndRemove

        Exchange getAndRemove​(String key)
        Gets and removes the exchange from the repository.
        Parameters:
        key - the claim check key
        Returns:
        the removed exchange, or null if the key did not exists.
      • push

        void push​(Exchange exchange)
        Pushes the exchange on top of the repository.
      • pop

        Exchange pop()
        Pops the repository and returns the latest. Or returns null if the stack is empty.
      • clear

        void clear()
        Clear the repository.