@Override public void run() { while ( run ) { LinkObject link = removeFromQueue(); if ( link == null ) continue; //should not happen unless we exceed wait time while ( link != null && run ) { link = sendAsyncData(link); }//while }//while }
@Override public boolean addToQueue(ChannelMessage msg, Member[] destination, InterceptorPayload payload) { final LinkObject obj = new LinkObject(msg,destination,payload); Runnable r = new Runnable() { @Override public void run() { sendAsyncData(obj); } }; executor.execute(r); return true; }
@Override public void run() { while (run) { LinkObject link = removeFromQueue(); if (link == null) continue; // should not happen unless we exceed wait time while (link != null && run) { link = sendAsyncData(link); } // while } // while }
@Override public boolean addToQueue(ChannelMessage msg, Member[] destination, InterceptorPayload payload) { final LinkObject obj = new LinkObject(msg, destination, payload); Runnable r = new Runnable() { @Override public void run() { sendAsyncData(obj); } }; executor.execute(r); return true; }
public LinkObject removeFromQueue() { return queue.remove(); }
@Override public LinkObject removeFromQueue() { return null; //not used, thread pool contains its own queue. }
@Override public LinkObject removeFromQueue() { return null; // not used, thread pool contains its own queue. }