Interface IAS4DuplicateManager

All Known Implementing Classes:
AS4DuplicateManager, AS4DuplicateManagerInMemory

public interface IAS4DuplicateManager
Base interface for an AS4 duplication manager
Since:
0.9.6
Author:
Philip Helger
  • Method Details

    • isEmpty

      boolean isEmpty()
      Returns:
      true if there are no entries contained, false otherwise.
    • size

      @Nonnegative int size()
      Returns:
      The number contained entries. Always ≥ 0.
    • getItemOfMessageID

      @Nullable IAS4DuplicateItem getItemOfMessageID(@Nullable String sMessageID)
      Find the first item with the provided message ID.
      Parameters:
      sMessageID - The message ID to be searched. May be null.
      Returns:
      null if no matching entry is contained.
      Since:
      0.10.1
    • getAll

      @Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsList<IAS4DuplicateItem> getAll()
      Returns:
      All entries contained in the list.
    • registerAndCheck

      @Nonnull com.helger.commons.state.EContinue registerAndCheck(@Nullable String sMessageID, @Nullable String sProfileID, @Nullable String sPModeID)
      Check if the passed message ID was already handled.
      Parameters:
      sMessageID - Message ID to check. May be null.
      sProfileID - Active AS4 profile ID. May be used to define the PMode further. May be null.
      sPModeID - Active AS4 PMode ID. May be null.
      Returns:
      EContinue.CONTINUE to continue processing a message, because it is no duplicate. EContinue.BREAK if it was determined as a duplicate.
    • clearCache

      @Nonnull com.helger.commons.state.EChange clearCache()
      Remove all entries in the cache.
      Returns:
      EChange
    • evictAllItemsBefore

      @Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsList<String> evictAllItemsBefore(@Nonnull OffsetDateTime aRefDT)
      Delete all duplicate items that were created before the provided time.
      Parameters:
      aRefDT - The reference date time to compare to. May not be null.
      Returns:
      A non-null list of all evicted message IDs.