398399400401402403404405406407408
} } }); if( sync ) { latch.acquire(); } } catch (InterruptedException e) { log.warn("Request to start checkpoint failed: " + e, e); }
131132133134135136137138139140141
message.writeBytes(new byte[1024]); connection.start(); connectionsEstablished.release(); startTest.acquire(); final int msgs = (MESSAGE_COUNT/PRODUCER_COUNT)+1; for (int i = 0; i < msgs; i++) { pp.increment(); producer.send(message); }
166167168169170171172173174175176
doneLatch.release(); } } }); connection.start(); doneLatch.acquire(); testsFinished.release(); connection.close(); return null; }
389390391392393394395396397398399
3031323334353637
public void doExecute(WorkerContext work, Executor executor) throws WorkException, InterruptedException { Latch latch = work.provideEndLatch(); executor.execute(work); latch.acquire(); } }
public void doExecute(WorkerContext work, Executor executor) throws WorkException, InterruptedException { Latch latch = work.provideStartLatch(); executor.execute(work); latch.acquire(); } }