public synchronized void addListener (Object key, SpaceListener listener, long timeout) { // Not properly implemented, use new TSpace class instead addListener (key, listener); } public synchronized void removeListener (Object key, SpaceListener listener) {
public ISORequestListenerAdaptor () { super (); sp = TransientSpace.getSpace (); } public void setConfiguration (Configuration cfg)
/** * same as Space.out (key,value) * @param key Key * @param value value */ public void write (String key, String value) { out (key, value); }
public static LocalSpace getSpace (String spaceName) { String key = "jpos:space/"+spaceName; Object obj = getSpace().rdp (key); Space sp = getSpace(); if (obj == null) { synchronized (TransientSpace.class) { obj = sp.rdp (key); if (obj == null) { obj = new TransientSpace (); sp.out (key, obj); } } } return (LocalSpace) obj; } /**
public synchronized Object rd (Object key) { Object obj; while ((obj = rdp (key)) == null) { try { this.wait (); } catch (InterruptedException e) { } } return obj; } public synchronized Object rd (Object key, long timeout) {
public synchronized Object in (Object key) { Object obj; while ((obj = inp (key)) == null) { try { this.wait (); } catch (InterruptedException e) { } } return obj; } public synchronized Object in (Object key, long timeout) {
/** * same as (String) Space.rdp (key) * @param key Key * @return value.toString() */ public String read (String key) { Object o = rdp (key); return o != null ? o.toString() : "null"; } public int size (Object key) {
public synchronized Object in (Object key, long timeout) { Object obj; long now = System.currentTimeMillis(); long end = now + timeout; while ((obj = inp (key)) == null && (now = System.currentTimeMillis()) < end) { try { this.wait (end - now); } catch (InterruptedException e) { } } return obj; } public synchronized Object rd (Object key) {
public Connector () { super (); sp = TransientSpace.getSpace (); } public Connector (String from, String to) {
public synchronized Object rd (Object key, long timeout) { Object obj; long now = System.currentTimeMillis(); long end = now + timeout; while ((obj = rdp (key)) == null && (now = System.currentTimeMillis()) < end) { try { this.wait (end - now); } catch (InterruptedException e) { } } return obj; } public void put (Object key, Object value) {
public void out (Object id, Object value, long timeout) { LeasedReference ref = new LeasedReference (value, timeout); out (id, ref); } public synchronized Object rdp (Object key) {
public SpaceChannel () { super (); sp = TransientSpace.getSpace (); } /**
public ISOChannelAdaptor () { super (); sp = TransientSpace.getSpace (); } public void setConfiguration (Configuration cfg)
public SpaceMUX () { super (); sp = TransientSpace.getSpace (); } /**
public static LocalSpace getSpace (String spaceName) { String key = "jpos:pSpace/"+spaceName; Space sp = TransientSpace.getSpace(); Object obj = sp.rdp (key); if (obj == null) { synchronized (PersistentSpace.class) { obj = sp.rdp (key); if (obj == null) { obj = new PersistentSpace (); sp.out (key, obj); } } } return (LocalSpace) obj; } public Set getKeySet () {