package matchfinder
Type Members
-
class
KeyEqualsFinder extends MonitorMatchFinder with StrictLogging
A simple match finder that checks for equivalent keys.
A simple match finder that checks for equivalent keys.
This class will work with byte arrays or any object that has a working equals implementation (for example, String).
This class will attempt to handle multiple occurences of the same key by storing the most recent reference topic offset that a key has been seen at and then ignoring any reference message that occur before that offset. This implementation is most efficient if your keys are Strings or if they are objects that have a working toString method. Byte arrays will have to be SHA-1 hashed and converted to a hex string internally for us with this finder.
This finder will periodically do garbage collection on its internal map of seen keys to avoid blowing the heap. The actual collection will occur outside of the main thread and remove keys whose last seen offset is less than 1000 less than the current start offset of the reference window.