Package com.helger.phase4.duplicate
Interface IAS4DuplicateManager
- All Known Implementing Classes:
AS4DuplicateManagerInMemory,AS4DuplicateManagerXML
public interface IAS4DuplicateManager
Base interface for an AS4 duplication manager
- Since:
- 0.9.6
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescription@NonNull com.helger.base.state.EChangeRemove all entries in the cache.@NonNull com.helger.collection.commons.ICommonsList<String> evictAllItemsBefore(@NonNull OffsetDateTime aRefDT) Delete all duplicate items that were created before the provided time.@NonNull com.helger.collection.commons.ICommonsList<IAS4DuplicateItem> getAll()@Nullable IAS4DuplicateItemgetItemOfMessageID(@Nullable String sMessageID) Find the first item with the provided message ID.booleanisEmpty()@NonNull com.helger.base.state.EContinueregisterAndCheck(@Nullable String sMessageID, @Nullable String sProfileID, @Nullable 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
@Nonnegative int 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
- Returns:
- All entries contained in the list.
-
registerAndCheck
@NonNull com.helger.base.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
@NonNull com.helger.base.state.EChange clearCache()Remove all entries in the cache.- Returns:
EChange
-
evictAllItemsBefore
@ReturnsMutableCopy @NonNull com.helger.collection.commons.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.
-