Class DefaultMessageIdCache

  • All Implemented Interfaces:
    MessageIdCache

    public class DefaultMessageIdCache
    extends Object
    implements MessageIdCache
    An implementation that uses a simple set to store received message IDs. Note that this implementation does not make any attempt to flush older message IDs or to persist the message IDs outside of this instance.
    • Constructor Detail

      • DefaultMessageIdCache

        public DefaultMessageIdCache()
    • Method Detail

      • checkUniquenessAndCacheId

        public boolean checkUniquenessAndCacheId​(String messageId)
        Description copied from interface: MessageIdCache
        Check messageId for uniqueness against previously encountered values and cache the ID. Note that the retention policy for previously encountered values is implementation specific.
        Specified by:
        checkUniquenessAndCacheId in interface MessageIdCache
        Parameters:
        messageId - the message ID to check for uniqueness and cache for future comparison
        Returns:
        true if and only if messageId is not already in the cache
      • getMessageIdSet

        protected Set<String> getMessageIdSet()