@Override public void onComplete(Continuation continuation) { expires.mark(); }
@Override public void accept(int acceptorID) throws IOException, InterruptedException { super.accept(acceptorID); accepts.mark(); }
@Override public void accept(int acceptorID) throws IOException { super.accept(acceptorID); accepts.mark(); }
@Override public void accept(int acceptorID) throws IOException, InterruptedException { super.accept(acceptorID); accepts.mark(); }
@Override public void accept(int acceptorID) throws IOException, InterruptedException { super.accept(acceptorID); accepts.mark(); }
@Override public void accept(int acceptorID) throws IOException { super.accept(acceptorID); accepts.mark(); }
private void commit(String key, Long timestamp) throws KaijuException { // put if newer while(true) { Long oldCommitted = lastCommitForKey.get(key); if(oldCommitted == null) { if(lastCommitForKey.putIfAbsent(key, timestamp) == null) { break; } } else if(oldCommitted < timestamp) { if(lastCommitForKey.replace(key, oldCommitted, timestamp)) { markForGC(key, oldCommitted); overwrittenMeter.mark(); break; } } else { markForGC(key, timestamp); nopWriteMeter.mark(); break; } } }
@Override protected void connectionOpened(Connection connection) { connections.inc(); super.connectionOpened(connection); connects.mark(); }
@Override protected void connectionOpened(Connection connection) { connections.inc(); super.connectionOpened(connection); connects.mark(); }
@Override protected void connectionOpened(Connection connection) { connections.inc(); super.connectionOpened(connection); connects.mark(); }
@Override protected void connectionOpened(Connection connection) { connections.inc(); super.connectionOpened(connection); connects.mark(); }
@Override protected void connectionOpened(Connection connection) { connections.inc(); super.connectionOpened(connection); connects.mark(); }
@Override public void run() { long currentTime = -1; KeyTimestampPair nextStamp = null; while(true) { try { if(nextStamp == null) nextStamp = candidatesForGarbageCollection.take(); if(nextStamp.getExpirationTime() < currentTime || (nextStamp.getExpirationTime() < (currentTime = System.currentTimeMillis())) ) { dataItems.remove(nextStamp); if(isEiger) eigerMap.get(nextStamp.getKey()).remove(nextStamp.getTimestamp()); gcWriteMeter.mark(); nextStamp = null; } else { Thread.sleep(nextStamp.getExpirationTime()-currentTime); } } catch (InterruptedException e) {} } } }, "Storage-GC-Thread").start();
@Override public void run() { Context starttime = commitCheckTimer.time(); try { boolean shouldCommit = handler.checkCommitted(timestamp, storageEngine.getPendingKeys(timestamp)); if(shouldCommit) { completedCommitMeter.mark(); storageEngine.commit(timestamp); } else { completedAbortMeter.mark(); storageEngine.abort(timestamp); } checkedStamps.remove(timestamp); } catch (HandlerException e) { logger.warn("Committer Handler exception ", e); } catch (KaijuException e) { logger.warn("Committer Kaiju exception ", e); } finally { starttime.stop(); } } }
@Override protected void connectionClosed(Connection connection) { super.connectionClosed(connection); disconnects.mark(); final long duration = clock.getTime() - connection.getTimeStamp(); this.duration.update(duration, TimeUnit.MILLISECONDS); connections.dec(); } }
@Override protected void connectionClosed(Connection connection) { super.connectionClosed(connection); disconnects.mark(); final long duration = clock.getTime() - connection.getTimeStamp(); this.duration.update(duration, TimeUnit.MILLISECONDS); connections.dec(); } }
@Override protected void connectionClosed(Connection connection) { super.connectionClosed(connection); disconnects.mark(); final long duration = clock.getTime() - connection.getTimeStamp(); this.duration.update(duration, TimeUnit.MILLISECONDS); connections.dec(); } }
@Override protected void connectionClosed(Connection connection) { super.connectionClosed(connection); disconnects.mark(); final long duration = clock.getTime() - connection.getTimeStamp(); this.duration.update(duration, TimeUnit.MILLISECONDS); connections.dec(); } }
@Override protected void connectionClosed(Connection connection) { super.connectionClosed(connection); disconnects.mark(); final long duration = clock.getTime() - connection.getTimeStamp(); this.duration.update(duration, TimeUnit.MILLISECONDS); connections.dec(); } }