@Test public void testOut() throws Throwable { TSpace tSpace = new TSpace(); tSpace.out(Integer.valueOf(0), "testString", 100L); assertEquals(1, tSpace.entries.size(), "tSpace.entries.size()"); }
@Override public void out (K key, V value) { if (key == null || value == null) throw new NullPointerException ("key=" + key + ", value=" + value); synchronized(this) { List l = getList(key); l.add (value); if (l.size() == 1) this.notifyAll (); } if (sl != null) notifyListeners(key, value); }
TSpace implements LocalSpace<K,V>, Loggeable, Runnable { @Override public void out (K key, V value) { if (key == null || value == null) throw new NullPointerException ("key=" + key + ", value=" + value); synchronized(this) { List l = getList(key); l.add (value); if (l.size() == 1) this.notifyAll (); } if (sl != null) notifyListeners(key, value); } }
TSpace implements LocalSpace<K,V>, Loggeable, Runnable { @Override public void out (K key, V value) { if (key == null || value == null) throw new NullPointerException ("key=" + key + ", value=" + value); synchronized(this) { List l = getList(key); l.add (value); if (l.size() == 1) this.notifyAll (); } if (sl != null) notifyListeners(key, value); } TSpace(); }
TSpace implements LocalSpace<K,V>, Loggeable, Runnable { @Override public void out (K key, V value) { if (key == null || value == null) throw new NullPointerException ("key=" + key + ", value=" + value); synchronized(this) { List l = getList(key); l.add (value); if (l.size() == 1) this.notifyAll (); } if (sl != null) notifyListeners(key, value); } TSpace(); @Override void out(K key, V value); @Override void out(K key, V value, long timeout); @Override synchronized V rdp(Object key); @Override synchronized V inp(Object key); @Override synchronized V in(Object key); @Override synchronized V in(Object key, long timeout); @Override synchronized V rd(Object key); @Override synchronized V rd(Object key, long timeout); @Override synchronized void nrd(Object key); @Override synchronized V nrd(Object key, long timeout); @Override void run(); void gc(); @Override synchronized int size(Object key); @Override synchronized void addListener(Object key, SpaceListener listener); @Override synchronized void addListener(Object key, SpaceListener listener, long timeout); @Override synchronized void removeListener(Object key, SpaceListener listener); boolean isEmpty(); @Override synchronized Set<K> getKeySet(); String getKeysAsString(); @Override void dump(PrintStream p, String indent); void notifyListeners(Object key, Object value); @Override void push(K key, V value); @Override void push(K key, V value, long timeout); @Override void put(K key, V value); @Override void put(K key, V value, long timeout); @Override boolean existAny(K[] keys); @Override boolean existAny(K[] keys, long timeout); Map getEntries(); void setEntries(Map entries); }
TSpace implements LocalSpace<K,V>, Loggeable, Runnable { @Override public void out (K key, V value) { if (key == null || value == null) throw new NullPointerException ("key=" + key + ", value=" + value); synchronized(this) { List l = getList(key); l.add (value); if (l.size() == 1) this.notifyAll (); } if (sl != null) notifyListeners(key, value); } TSpace(); @Override void out(K key, V value); @Override void out(K key, V value, long timeout); @Override synchronized V rdp(Object key); @Override synchronized V inp(Object key); @Override synchronized V in(Object key); @Override synchronized V in(Object key, long timeout); @Override synchronized V rd(Object key); @Override synchronized V rd(Object key, long timeout); @Override synchronized void nrd(Object key); @Override synchronized V nrd(Object key, long timeout); @Override void run(); void gc(); @Override synchronized int size(Object key); @Override synchronized void addListener(Object key, SpaceListener listener); @Override synchronized void addListener(Object key, SpaceListener listener, long timeout); @Override synchronized void removeListener(Object key, SpaceListener listener); boolean isEmpty(); @Override synchronized Set<K> getKeySet(); String getKeysAsString(); @Override void dump(PrintStream p, String indent); void notifyListeners(Object key, Object value); @Override void push(K key, V value); @Override void push(K key, V value, long timeout); @Override void put(K key, V value); @Override void put(K key, V value, long timeout); @Override boolean existAny(K[] keys); @Override boolean existAny(K[] keys, long timeout); Map getEntries(); void setEntries(Map entries); static final long GCDELAY; }