/** * Hand in the object to share. */ public void handIn(String key, V obj) { if (!retrieveSharedQueue(key).offer(obj)) { throw new RuntimeException("Could not register the given element, broker slot is already occupied."); } }
/** * Hand in the object to share. */ public void handIn(String key, V obj) { if (!retrieveSharedQueue(key).offer(obj)) { throw new RuntimeException("Could not register the given element, broker slot is already occupied."); } }
/** * hand in the object to share */ public void handIn(String key, V obj) { if (!retrieveSharedQueue(key).offer(obj)) { throw new RuntimeException("Could not register the given element, broker slot is already occupied."); } }
/** * Hand in the object to share. */ public void handIn(String key, V obj) { if (!retrieveSharedQueue(key).offer(obj)) { throw new RuntimeException("Could not register the given element, broker slot is already occupied."); } }
/** blocking retrieval and removal of the object to share */ public V getAndRemove(String key) { try { V objToShare = retrieveSharedQueue(key).take(); mediations.remove(key); return objToShare; } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** Blocking retrieval and removal of the object to share. */ public V getAndRemove(String key) { try { V objToShare = retrieveSharedQueue(key).take(); mediations.remove(key); return objToShare; } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** Blocking retrieval and removal of the object to share. */ public V getAndRemove(String key) { try { V objToShare = retrieveSharedQueue(key).take(); mediations.remove(key); return objToShare; } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** Blocking retrieval and removal of the object to share. */ public V getAndRemove(String key) { try { V objToShare = retrieveSharedQueue(key).take(); mediations.remove(key); return objToShare; } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** blocking retrieval and removal of the object to share */ public V get(String key) { try { BlockingQueue<V> queue = retrieveSharedQueue(key); V objToShare = queue.take(); if (!queue.offer(objToShare)) { throw new RuntimeException("Error: Concurrent modification of the broker slot for key '" + key + "'."); } return objToShare; } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** Blocking retrieval and removal of the object to share. */ public V get(String key) { try { BlockingQueue<V> queue = retrieveSharedQueue(key); V objToShare = queue.take(); if (!queue.offer(objToShare)) { throw new RuntimeException("Error: Concurrent modification of the broker slot for key '" + key + "'."); } return objToShare; } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** Blocking retrieval and removal of the object to share. */ public V get(String key) { try { BlockingQueue<V> queue = retrieveSharedQueue(key); V objToShare = queue.take(); if (!queue.offer(objToShare)) { throw new RuntimeException("Error: Concurrent modification of the broker slot for key '" + key + "'."); } return objToShare; } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** Blocking retrieval and removal of the object to share. */ public V get(String key) { try { BlockingQueue<V> queue = retrieveSharedQueue(key); V objToShare = queue.take(); if (!queue.offer(objToShare)) { throw new RuntimeException("Error: Concurrent modification of the broker slot for key '" + key + "'."); } return objToShare; } catch (InterruptedException e) { throw new RuntimeException(e); } }