/** * Maps the specified key to the specified value in the hashtable. Neither of both parameters can be null * @param key - the hashtable key * @param value - the value * @return the previous value of the specified key in this hashtable, or null if it did not have one */ public V put(K key, V value) { V prev_val=get(key); if(send_message == true) { try { MethodCall call=new MethodCall((short)1, new Object[]{key, value}); disp.callRemoteMethods(null, call, update_mode, timeout); } catch(Exception e) { throw new RuntimeException("put(" + key + ", " + value + ") failed", e); } } else { _put(key, value); } return prev_val; }