private URI createHaURI(URI me, Server<?, ?> server) {
   String hostString = ServerUtil.getHostString(server.getSocketAddress());
   int port = server.getSocketAddress().getPort();
   InstanceId serverId = config.get(ClusterSettings.server_id);
   String host =
       hostString.contains(HighAvailabilityModeSwitcher.INADDR_ANY) ? me.getHost() : hostString;
   return URI.create("ha://" + host + ":" + port + "?serverId=" + serverId);
 }
Beispiel #2
0
 @Override
 protected void writeFailureResponse(Throwable exception, ChunkingChannelBuffer buffer) {
   responseFailureEncountered = true;
   super.writeFailureResponse(exception, buffer);
 }