Package jadex.commons.collection
Interface ILeaseTimeSet<E>
-
- All Superinterfaces:
java.util.Collection<E>
,java.lang.Iterable<E>
- All Known Implementing Classes:
LeaseTimeSet
,LeaseTimeSet.SynchronizedLeaseTimeCollection
,PassiveLeaseTimeSet
public interface ILeaseTimeSet<E> extends java.util.Collection<E>
Special methods for a lease time collection.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
add(E e, long leasetime)
Add a new entry.void
setRemoveCommand(ICommand<Tuple2<E,java.lang.Long>> cmd)
Set the remove cmd.void
touch(E e)
Update the timestamp of e.void
touch(E e, long leasetime)
Update the timestamp of e.boolean
update(E e)
Add a new entry or update an existing entry.boolean
update(E e, long leasetime)
Add a new entry or update an existing entry.
-
-
-
Method Detail
-
add
boolean add(E e, long leasetime)
Add a new entry.- Parameters:
e
- The entry.leasetime
- The leasetime.- Returns:
- True, if new entry.
-
update
boolean update(E e)
Add a new entry or update an existing entry.- Parameters:
entry
- The entry.- Returns:
- True, if new entry.
-
update
boolean update(E e, long leasetime)
Add a new entry or update an existing entry.- Parameters:
entry
- The entry.- Returns:
- True, if new entry.
-
touch
void touch(E e)
Update the timestamp of e.- Parameters:
entry
- The entry.
-
touch
void touch(E e, long leasetime)
Update the timestamp of e.- Parameters:
entry
- The entry.
-
-