Package com.helger.phase4.duplicate
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 Summary
Modifier and TypeMethodDescriptioncom.helger.commons.state.EChangeRemove all entries in the cache.com.helger.commons.collection.impl.ICommonsList<String>evictAllItemsBefore(OffsetDateTime aRefDT) Delete all duplicate items that were created before the provided time.com.helger.commons.collection.impl.ICommonsList<IAS4DuplicateItem>getAll()getItemOfMessageID(String sMessageID) Find the first item with the provided message ID.booleanisEmpty()com.helger.commons.state.EContinueregisterAndCheck(String sMessageID, String sProfileID, String sPModeID) Check if the passed message ID was already handled.intsize()
-
Method Details
-
isEmpty
boolean isEmpty()- Returns:
trueif there are no entries contained,falseotherwise.
-
size
- Returns:
- The number contained entries. Always ≥ 0.
-
getItemOfMessageID
Find the first item with the provided message ID.- Parameters:
sMessageID- The message ID to be searched. May benull.- Returns:
nullif 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 benull.sProfileID- Active AS4 profile ID. May be used to define the PMode further. May benull.sPModeID- Active AS4 PMode ID. May benull.- Returns:
EContinue.CONTINUEto continue processing a message, because it is no duplicate.EContinue.BREAKif it was determined as a duplicate.
-
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 benull.- Returns:
- A non-
nulllist of all evicted message IDs.
-