/** * Write log. * * @param bytes the bytes * @throws GondolaException thrown if the local member is not the leader * @throws InterruptedException the interrupted exception */ public void writeLog(byte[] bytes) throws GondolaException, InterruptedException { Command command = shard.checkoutCommand(); Timer.Context time = commitTimer.time(); command.commit(bytes, 0, bytes.length); time.stop(); } /**
int c = ccounter.incrementAndGet(); latency.head(c); command.commit(buffer, 0, 128); latency.tail(c); waitTime.addAndGet(System.currentTimeMillis() - start);
return msg; command.commit(buffer, 0, buffer.length); } finally { command.release();