org.apache.ratis.thirdparty.io.grpc.Server Java Examples
The following examples show how to use
org.apache.ratis.thirdparty.io.grpc.Server.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GrpcService.java From incubator-ratis with Apache License 2.0 | 5 votes |
private GrpcService(RaftServer server, GrpcTlsConfig tlsConfig) { this(server, server::getId, GrpcConfigKeys.Server.port(server.getProperties()), GrpcConfigKeys.messageSizeMax(server.getProperties(), LOG::info), RaftServerConfigKeys.Log.Appender.bufferByteLimit(server.getProperties()), GrpcConfigKeys.flowControlWindow(server.getProperties(), LOG::info), RaftServerConfigKeys.Rpc.requestTimeout(server.getProperties()), tlsConfig); }
Example #2
Source File: GrpcService.java From incubator-ratis with Apache License 2.0 | 5 votes |
@Override public void closeImpl() throws IOException { final String name = getId() + ": shutdown server with port " + server.getPort(); LOG.info("{} now", name); final Server s = server.shutdownNow(); super.closeImpl(); try { s.awaitTermination(); } catch(InterruptedException e) { throw IOUtils.toInterruptedIOException(name + " failed", e); } LOG.info("{} successfully", name); }
Example #3
Source File: GrpcService.java From ratis with Apache License 2.0 | 5 votes |
private GrpcService(RaftServer server, GrpcTlsConfig tlsConfig) { this(server, server::getId, GrpcConfigKeys.Server.port(server.getProperties()), GrpcConfigKeys.messageSizeMax(server.getProperties(), LOG::info), RaftServerConfigKeys.Log.Appender.bufferByteLimit(server.getProperties()), GrpcConfigKeys.flowControlWindow(server.getProperties(), LOG::info), RaftServerConfigKeys.Rpc.requestTimeout(server.getProperties()), tlsConfig); }
Example #4
Source File: GrpcService.java From ratis with Apache License 2.0 | 5 votes |
@Override public void closeImpl() throws IOException { final String name = getId() + ": shutdown server with port " + server.getPort(); LOG.info("{} now", name); final Server s = server.shutdownNow(); super.closeImpl(); try { s.awaitTermination(); } catch(InterruptedException e) { throw IOUtils.toInterruptedIOException(name + " failed", e); } LOG.info("{} successfully", name); }