@NotThreadSafe public class GrpcDataServer extends Object implements DataServer
Constructor and Description |
---|
GrpcDataServer(String hostName,
SocketAddress bindAddress,
BlockWorkerGrpc.BlockWorkerImplBase blockWorkerService)
Creates a new instance of
GrpcDataServer . |
Modifier and Type | Method and Description |
---|---|
void |
awaitTermination()
Waits for server to terminate.
|
void |
close() |
protected GrpcServerBuilder |
createServerBuilder(String hostName,
SocketAddress bindAddress,
ChannelType type) |
SocketAddress |
getBindAddress()
Gets the actual bind socket address.
|
SocketAddress |
getS3BindAddress()
Gets the actual bind socket address for S3.
|
boolean |
isClosed()
Checks if the
DataServer is closed. |
public GrpcDataServer(String hostName, SocketAddress bindAddress, BlockWorkerGrpc.BlockWorkerImplBase blockWorkerService)
GrpcDataServer
.hostName
- the server host namebindAddress
- the server bind addressblockWorkerService
- the instance of BlockWorkerGrpc.BlockWorkerImplBaseprotected GrpcServerBuilder createServerBuilder(String hostName, SocketAddress bindAddress, ChannelType type)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public SocketAddress getBindAddress()
DataServer
InetSocketAddress
or a
DomainSocketAddress
.getBindAddress
in interface DataServer
public SocketAddress getS3BindAddress()
DataServer
InetSocketAddress
or a
DomainSocketAddress
.getS3BindAddress
in interface DataServer
public boolean isClosed()
DataServer
DataServer
is closed.isClosed
in interface DataServer
DataServer
is closed, false otherwisepublic void awaitTermination()
DataServer
awaitTermination
in interface DataServer
Copyright © 2023. All Rights Reserved.