public void sendRequest(Buffer data) throws Exception { sendRequest(data, rsps.keySet()); }
protected RequestCorrelator removeEntry(long id) { Request req=requests.remove(id); if(req != null) { long time_ns=req.start_time > 0? System.nanoTime() - req.start_time : 0; if(req instanceof UnicastRequest) rpc_stats.add(RpcStats.Type.UNICAST, ((UnicastRequest)req).target, true, time_ns); else if(req instanceof GroupRequest) { if(req.options != null && req.options.anycasting()) rpc_stats.addAnycast(true, time_ns, ((GroupRequest)req).rsps.keySet()); else rpc_stats.add(RpcStats.Type.MULTICAST, null, true, time_ns); } else log.error("request type %s not known", req != null? req.getClass().getSimpleName() : req); } return this; }
public void sendRequest(Buffer data) throws Exception { sendRequest(data, rsps.keySet()); }
/** * Returns the Rsp at index i * @param i The index * @return a Rsp * @throws ArrayIndexOutOfBoundsException * @deprecated Use {@link #entrySet()} or {@link #values()} instead */ public Object elementAt(int i) throws ArrayIndexOutOfBoundsException { Set keys=new TreeSet(keySet()); if(keys == null) return null; Object[] keys_array=keys.toArray(); Object key=keys_array[i]; return get(key); }
protected RequestCorrelator removeEntry(long id) { Request req=requests.remove(id); if(req != null) { long time_ns=req.start_time > 0? System.nanoTime() - req.start_time : 0; if(req instanceof UnicastRequest) rpc_stats.add(RpcStats.Type.UNICAST, ((UnicastRequest)req).target, true, time_ns); else if(req instanceof GroupRequest) { if(req.options != null && req.options.anycasting()) rpc_stats.addAnycast(true, time_ns, ((GroupRequest)req).rsps.keySet()); else rpc_stats.add(RpcStats.Type.MULTICAST, null, true, time_ns); } else log.error("request type %s not known", req != null? req.getClass().getSimpleName() : req); } return this; }