public class KvQueryServer extends NetworkServer<KvRequest,KvResponse> implements QueryServer
QueryServer
.Constructor and Description |
---|
KvQueryServer(int serverId,
int numServers,
String bindAddress,
Iterator<Integer> bindPortIterator,
Integer numEventLoopThreads,
Integer numQueryThreads,
TableQuery lookup,
ServiceRequestStats stats) |
Modifier and Type | Method and Description |
---|---|
InetSocketAddress |
getServerAddress()
Returns the address of this server.
|
AbstractServerHandler<KvRequest,KvResponse> |
initializeHandler()
Returns the
handler to be used for serving the incoming
requests. |
void |
shutdown()
Shuts down the server and all related thread pools.
|
void |
start()
Starts the server by binding to the configured bind address (blocking).
|
getQueryExecutor, getServerName, isEventGroupShutdown, shutdownServer
public KvQueryServer(int serverId, int numServers, String bindAddress, Iterator<Integer> bindPortIterator, Integer numEventLoopThreads, Integer numQueryThreads, TableQuery lookup, ServiceRequestStats stats)
public AbstractServerHandler<KvRequest,KvResponse> initializeHandler()
NetworkServer
handler
to be used for serving the incoming
requests.initializeHandler
in class NetworkServer<KvRequest,KvResponse>
public void start() throws Throwable
NetworkServer
start
in interface QueryServer
start
in class NetworkServer<KvRequest,KvResponse>
Throwable
public InetSocketAddress getServerAddress()
NetworkServer
getServerAddress
in interface QueryServer
getServerAddress
in class NetworkServer<KvRequest,KvResponse>
public void shutdown()
QueryServer
shutdown
in interface QueryServer
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.