Package jadex.commons.collection
Class LeaseTimeSet.SynchronizedLeaseTimeCollection<E>
- java.lang.Object
- 
- jadex.commons.collection.LeaseTimeSet.SynchronizedLeaseTimeCollection<E>
 
- 
- All Implemented Interfaces:
- ILeaseTimeSet<E>,- java.io.Serializable,- java.lang.Iterable<E>,- java.util.Collection<E>
 - Enclosing class:
- LeaseTimeSet<E>
 
 public static class LeaseTimeSet.SynchronizedLeaseTimeCollection<E> extends java.lang.Object implements ILeaseTimeSet<E>, java.io.Serializable Synchronized lease time collection.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description SynchronizedLeaseTimeCollection(ILeaseTimeSet<E> c)SynchronizedLeaseTimeCollection(ILeaseTimeSet<E> c, java.lang.Object mutex)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E e)booleanadd(E e, long leasetime)Add a new entry.booleanaddAll(java.util.Collection<? extends E> coll)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> coll)booleanisEmpty()java.util.Iterator<E>iterator()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> coll)booleanretainAll(java.util.Collection<?> coll)voidsetRemoveCommand(ICommand<Tuple2<E,java.lang.Long>> cmd)Set the remove cmd.intsize()java.lang.Object[]toArray()<T> T[]toArray(T[] a)java.lang.StringtoString()voidtouch(E e)Update the timestamp of e.voidtouch(E e, long leasetime)Update the timestamp of e.booleanupdate(E e)Add a new entry or update an existing entry.booleanupdate(E e, long leasetime)Add a new entry or update an existing entry.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
- 
 
- 
- 
- 
Constructor Detail- 
SynchronizedLeaseTimeCollectionpublic SynchronizedLeaseTimeCollection(ILeaseTimeSet<E> c) 
 - 
SynchronizedLeaseTimeCollectionpublic SynchronizedLeaseTimeCollection(ILeaseTimeSet<E> c, java.lang.Object mutex) 
 
- 
 - 
Method Detail- 
setRemoveCommandpublic void setRemoveCommand(ICommand<Tuple2<E,java.lang.Long>> cmd) Set the remove cmd.- Specified by:
- setRemoveCommandin interface- ILeaseTimeSet<E>
 
 - 
sizepublic int size() - Specified by:
- sizein interface- java.util.Collection<E>
 
 - 
isEmptypublic boolean isEmpty() - Specified by:
- isEmptyin interface- java.util.Collection<E>
 
 - 
containspublic boolean contains(java.lang.Object o) - Specified by:
- containsin interface- java.util.Collection<E>
 
 - 
toArraypublic java.lang.Object[] toArray() - Specified by:
- toArrayin interface- java.util.Collection<E>
 
 - 
toArraypublic <T> T[] toArray(T[] a) - Specified by:
- toArrayin interface- java.util.Collection<E>
 
 - 
iteratorpublic java.util.Iterator<E> iterator() 
 - 
removepublic boolean remove(java.lang.Object o) - Specified by:
- removein interface- java.util.Collection<E>
 
 - 
containsAllpublic boolean containsAll(java.util.Collection<?> coll) - Specified by:
- containsAllin interface- java.util.Collection<E>
 
 - 
addAllpublic boolean addAll(java.util.Collection<? extends E> coll) - Specified by:
- addAllin interface- java.util.Collection<E>
 
 - 
removeAllpublic boolean removeAll(java.util.Collection<?> coll) - Specified by:
- removeAllin interface- java.util.Collection<E>
 
 - 
retainAllpublic boolean retainAll(java.util.Collection<?> coll) - Specified by:
- retainAllin interface- java.util.Collection<E>
 
 - 
clearpublic void clear() - Specified by:
- clearin interface- java.util.Collection<E>
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
addpublic boolean add(E e, long leasetime) Description copied from interface:ILeaseTimeSetAdd a new entry.- Specified by:
- addin interface- ILeaseTimeSet<E>
- Parameters:
- e- The entry.
- leasetime- The leasetime.
- Returns:
- True, if new entry.
 
 - 
updatepublic boolean update(E e) Description copied from interface:ILeaseTimeSetAdd a new entry or update an existing entry.- Specified by:
- updatein interface- ILeaseTimeSet<E>
- Returns:
- True, if new entry.
 
 - 
updatepublic boolean update(E e, long leasetime) Add a new entry or update an existing entry.- Specified by:
- updatein interface- ILeaseTimeSet<E>
- Parameters:
- entry- The entry.
- Returns:
- True, if new entry.
 
 - 
touchpublic void touch(E e) Update the timestamp of e.- Specified by:
- touchin interface- ILeaseTimeSet<E>
- Parameters:
- entry- The entry.
 
 - 
touchpublic void touch(E e, long leasetime) Update the timestamp of e.- Specified by:
- touchin interface- ILeaseTimeSet<E>
- Parameters:
- entry- The entry.
 
 
- 
 
-