public int size() { synchronized (mutex) {return c.size();} }
public Object[] toArray() { synchronized (mutex) {return c.toArray();} }
public boolean update(E e) { synchronized(mutex) {return c.update(e);} }
public boolean remove(Object o) { synchronized (mutex) {return c.remove(o);} }
public boolean contains(Object o) { synchronized (mutex) {return c.contains(o);} }
public boolean add(E e) { synchronized (mutex) {return c.add(e);} }
public void clear() { synchronized (mutex) {c.clear();} }
public boolean isEmpty() { synchronized (mutex) {return c.isEmpty();} }
public boolean containsAll(Collection<?> coll) { synchronized (mutex) {return c.containsAll(coll);} }
public boolean addAll(Collection<? extends E> coll) { synchronized (mutex) {return c.addAll(coll);} }
/** * Add a new entry or update an existing entry. * @param entry The entry. * @return True, if new entry. */ public boolean update(E e, long leasetime) { synchronized(mutex) {return c.update(e, leasetime);} }
/** * Removes the mapping for this key from this map if it is present. * More formally, if this map contains a mapping * from key <tt>k</tt> to value <tt>v</tt> such that * <code>(key==null ? k==null : key.equals(k))</code>, that mapping * is removed. (The map can contain at most one such mapping.) * * <p>Returns the value to which the map previously associated the key, or * <tt>null</tt> if the map contained no mapping for this key. (A * <tt>null</tt> return can also indicate that the map previously * associated <tt>null</tt> with the specified key if the implementation * supports <tt>null</tt> values.) The map will not contain a mapping for * the specified key once the call returns. * * @param key key whose mapping is to be removed from the map. * @return collection associated with specified key, or <tt>null</tt> * if there was no mapping for key. * * @throws ClassCastException if the key is of an inappropriate type for * this map (optional). * @throws NullPointerException if the key is <tt>null</tt> and this map * does not not permit <tt>null</tt> keys (optional). */ public V remove(Object key) { times.remove(key); return map.remove(key); }
public boolean add(E e, long leasetime) { synchronized(mutex) {return c.add(e, leasetime);} }
/** * Removes all mappings from this map. */ public void clear() { times.clear(); map.clear(); }
/** * Add a new subscription. * @param future The subscription info. */ protected void addSubscribedTo(SubscriptionInfo info) { if(subscribedto==null) { subscribedto = LeaseTimeSet.createLeaseTimeCollection((long)(2.2*timelimit), new ICommand<SubscriptionInfo>() { public void execute(SubscriptionInfo entry) { System.out.println("Remove subscription of: "+entry.getPlatformId()); getRegistry().removeSubregistry(entry.getPlatformId()); } }, new AgentDelayRunner(component), false, null); } subscribedto.update(info); }
public <T> T[] toArray(T[] a) { synchronized (mutex) {return c.toArray(a);} }