コード例 #1
0
 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);
 }
コード例 #2
0
ファイル: MadeUpServer.java プロジェクト: radekzak/neo4j
 @Override
 protected void writeFailureResponse(Throwable exception, ChunkingChannelBuffer buffer) {
   responseFailureEncountered = true;
   super.writeFailureResponse(exception, buffer);
 }