Package org.snmp4j.agent.util
Class TemporaryList<T>
java.lang.Object
org.snmp4j.agent.util.TemporaryList<T>
The
TemporaryList
implements a list whose items are
automatically removed after a predefined timeout. When an item is
removed by timeout, listener can be called to handle the remove
operation.- Author:
- Frank Fock
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTemporaryList
(int timeout) Creates a temporary list with the given timeout in milliseconds. -
Method Summary
-
Field Details
-
DEFAULT_ITEM_TIMEOUT
public static final int DEFAULT_ITEM_TIMEOUT- See Also:
-
-
Constructor Details
-
TemporaryList
public TemporaryList() -
TemporaryList
public TemporaryList(int timeout) Creates a temporary list with the given timeout in milliseconds.- Parameters:
timeout
- the milliseconds to wait before an entry may get removed from this list.
-
-
Method Details
-
add
-
contains
-
remove
-
setTimeout
public void setTimeout(int timeout) -
getTimeout
public int getTimeout() -
iterator
-
size
public int size() -
clear
public void clear()
-