public class HashHistoryHolder<T> extends java.lang.Object implements MessagesHistoryHolder<T>
Constructor and Description |
---|
HashHistoryHolder(int tailLength) |
Modifier and Type | Method and Description |
---|---|
boolean |
isKnownMessageId(T id)
This method checks if given id was already seen before
|
boolean |
storeIfUnknownMessageId(T id)
This method adds id of the message to the storage, if message is unknown
|
protected final java.util.Set<T> set
public HashHistoryHolder(int tailLength)
tailLength
- number of elements to hold in historypublic boolean storeIfUnknownMessageId(T id)
MessagesHistoryHolder
storeIfUnknownMessageId
in interface MessagesHistoryHolder<T>
public boolean isKnownMessageId(T id)
MessagesHistoryHolder
isKnownMessageId
in interface MessagesHistoryHolder<T>
Copyright © 2019. All rights reserved.