if (this.memcachedClient.getProtocol() == Protocol.Text) { TextCacheDumpCommand textCacheDumpCommand = new TextCacheDumpCommand(latch, itemNumber); session.write(textCacheDumpCommand); throw new MemcachedException(this.memcachedClient.getProtocol().name() + " protocol doesn't support iterating all keys in memcached");
private void checkHeartBeat(Session session) { if (this.enableHeartBeat) { log.debug("Check session ({}) is alive,send heartbeat", session.getRemoteSocketAddress() == null ? "unknown" : SystemUtils.getRawAddress(session.getRemoteSocketAddress()) + ":" + session.getRemoteSocketAddress().getPort()); Command versionCommand = null; CountDownLatch latch = new CountDownLatch(1); if (this.client.getProtocol() == Protocol.Binary) { versionCommand = new BinaryVersionCommand(latch, session.getRemoteSocketAddress()); } else { versionCommand = new TextVersionCommand(latch, session.getRemoteSocketAddress()); } session.write(versionCommand); // Start a check thread,avoid blocking reactor thread if (this.heartBeatThreadPool != null) { this.heartBeatThreadPool.execute(new CheckHeartResultThread(versionCommand, session)); } } }
if (this.memcachedClient.getProtocol() == Protocol.Text) { TextCacheDumpCommand textCacheDumpCommand = new TextCacheDumpCommand(latch, itemNumber); session.write(textCacheDumpCommand); throw new MemcachedException(this.memcachedClient.getProtocol().name() + " protocol doesn't support iterating all keys in memcached");
private void checkHeartBeat(Session session) { if (this.enableHeartBeat) { log.debug("Check session ({}) is alive,send heartbeat", session.getRemoteSocketAddress() == null ? "unknown" : SystemUtils.getRawAddress(session.getRemoteSocketAddress()) + ":" + session.getRemoteSocketAddress().getPort()); Command versionCommand = null; CountDownLatch latch = new CountDownLatch(1); if (this.client.getProtocol() == Protocol.Binary) { versionCommand = new BinaryVersionCommand(latch, session.getRemoteSocketAddress()); } else { versionCommand = new TextVersionCommand(latch, session.getRemoteSocketAddress()); } session.write(versionCommand); // Start a check thread,avoid blocking reactor thread if (this.heartBeatThreadPool != null) { this.heartBeatThreadPool.execute(new CheckHeartResultThread(versionCommand, session)); } } }