Package com.helger.phase4.duplicate
Class AS4DuplicateManagerXML
java.lang.Object
com.helger.dao.AbstractDAO
com.helger.dao.wal.AbstractWALDAO<AS4DuplicateItem>
com.helger.dao.wal.AbstractMapBasedWALDAO<IAS4DuplicateItem,AS4DuplicateItem>
com.helger.photon.io.dao.AbstractPhotonMapBasedWALDAO<IAS4DuplicateItem,AS4DuplicateItem>
com.helger.phase4.duplicate.AS4DuplicateManagerXML
- All Implemented Interfaces:
com.helger.commons.lang.IHasSize,com.helger.commons.log.IHasConditionalLogger,com.helger.dao.IAutoSaveAware,com.helger.dao.IDAO,com.helger.dao.wal.IMapBasedDAO<IAS4DuplicateItem>,IAS4DuplicateManager
@ThreadSafe
public class AS4DuplicateManagerXML
extends com.helger.photon.io.dao.AbstractPhotonMapBasedWALDAO<IAS4DuplicateItem,AS4DuplicateItem>
implements IAS4DuplicateManager
This is the duplicate checker for avoiding duplicate messages.
- Author:
- Philip Helger
-
Nested Class Summary
Nested classes/interfaces inherited from class com.helger.dao.wal.AbstractMapBasedWALDAO
com.helger.dao.wal.AbstractMapBasedWALDAO.InitSettings<IMPLTYPE>Nested classes/interfaces inherited from interface com.helger.dao.IDAO
com.helger.dao.IDAO.EMode -
Field Summary
Fields inherited from class com.helger.dao.wal.AbstractMapBasedWALDAO
ELEMENT_ITEM, ELEMENT_ROOTFields inherited from class com.helger.dao.wal.AbstractWALDAO
DEFAULT_WAITING_TIME, WAL_XWS, WRITE_XWSFields inherited from class com.helger.dao.AbstractDAO
CONDLOG, DEFAULT_AUTO_SAVE_ENABLED, FILENAME_EXTENSION_NEW, FILENAME_EXTENSION_PREV, m_aRWLock, RW_LOCK -
Constructor Summary
Constructors -
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.getItemOfMessageID(String sMessageID) Find the first item with the provided message ID.com.helger.commons.state.EContinueregisterAndCheck(String sMessageID, String sProfileID, String sPModeID) Check if the passed message ID was already handled.Methods inherited from class com.helger.photon.io.dao.AbstractPhotonMapBasedWALDAO
isReloadable, reloadMethods inherited from class com.helger.dao.wal.AbstractMapBasedWALDAO
callbacks, containsAllIDs, containsAny, containsNone, containsOnly, containsWithID, createWriteData, findAll, findAllMapped, findFirst, findFirstMapped, forEach, forEach, forEachKey, forEachKey, forEachValue, forEachValue, getAll, getAll, getAllIDs, getAllMapped, getAtIndex, getCount, getNone, getOfID, internalContainsWithID, internalCreateItem, internalCreateItem, internalDeleteItem, internalDeleteItem, internalDirectGetAll, internalForEachValue, internalForEachValue, internalGetAll, internalGetAllSortedByKey, internalGetOfID, internalMarkItemDeleted, internalMarkItemDeleted, internalMarkItemUndeleted, internalMarkItemUndeleted, internalRemoveAllItemsNoCallback, internalUpdateItem, internalUpdateItem, isEmpty, isNotEmpty, markAsChanged, onRead, onRecoveryCreate, onRecoveryDelete, onRecoveryUpdate, size, toStringMethods inherited from class com.helger.dao.wal.AbstractWALDAO
convertNativeToWALString, convertWALStringToNative, getDataTypeClass, getFilenameProvider, getInitCount, getIO, getLastFilename, getLastInitDateTime, getLastReadDateTime, getLastWriteDateTime, getReadCount, getSafeFile, getWaitingTime, getWALXMLWriterSettings, getWriteCount, getXMLWriterSettings, initialRead, markAsChanged, modifyWriteData, onBetweenReadAndWAL, onFilenameChange, onInit, onRecoveryErrorConvertToNative, setWaitingTime, triggerExceptionHandlersRead, triggerExceptionHandlersWrite, writeToFileOnPendingChangesMethods inherited from class com.helger.dao.AbstractDAO
beginWithoutAutoSave, checkFileAccess, endWithoutAutoSave, exceptionHandlersRead, exceptionHandlersWrite, hasPendingChanges, internalHasPendingChanges, internalIsAutoSaveEnabled, internalSetPendingChanges, isAutoSaveEnabled, isSilentMode, setSilentModeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.phase4.duplicate.IAS4DuplicateManager
getAll, isEmpty, sizeMethods inherited from interface com.helger.dao.IAutoSaveAware
performWithoutAutoSave, performWithoutAutoSave, performWithoutAutoSaveThrowing, performWithoutAutoSaveThrowing
-
Constructor Details
-
AS4DuplicateManagerXML
- Throws:
com.helger.dao.DAOException
-
-
Method Details
-
registerAndCheck
@Nonnull public com.helger.commons.state.EContinue registerAndCheck(@Nullable String sMessageID, @Nullable String sProfileID, @Nullable String sPModeID) Description copied from interface:IAS4DuplicateManagerCheck if the passed message ID was already handled.- Specified by:
registerAndCheckin interfaceIAS4DuplicateManager- 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
Description copied from interface:IAS4DuplicateManagerRemove all entries in the cache.- Specified by:
clearCachein interfaceIAS4DuplicateManager- Returns:
EChange
-
evictAllItemsBefore
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<String> evictAllItemsBefore(@Nonnull OffsetDateTime aRefDT) Description copied from interface:IAS4DuplicateManagerDelete all duplicate items that were created before the provided time.- Specified by:
evictAllItemsBeforein interfaceIAS4DuplicateManager- Parameters:
aRefDT- The reference date time to compare to. May not benull.- Returns:
- A non-
nulllist of all evicted message IDs.
-
getItemOfMessageID
Description copied from interface:IAS4DuplicateManagerFind the first item with the provided message ID.- Specified by:
getItemOfMessageIDin interfaceIAS4DuplicateManager- Parameters:
sMessageID- The message ID to be searched. May benull.- Returns:
nullif no matching entry is contained.
-