@Override public int compareTo(ChannelGroup o) { int v = name().compareTo(o.name()); if (v != 0) { return v; } return System.identityHashCode(this) - System.identityHashCode(o); }
/** * Shutdown this client and close all open connections. The client should be discarded after * calling shutdown. */ public void shutdown() { for (Channel c : channels) { ChannelPipeline pipeline = c.getPipeline(); RedisAsyncConnection<?, ?> connection = pipeline.get(RedisAsyncConnection.class); connection.close(); } ChannelGroupFuture future = channels.close(); future.awaitUninterruptibly(); bootstrap.releaseExternalResources(); }