1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.hadoop.hbase.ipc;
21
22 import java.io.IOException;
23 import java.net.InetSocketAddress;
24
25 import org.apache.hadoop.hbase.classification.InterfaceAudience;
26 import org.apache.hadoop.hbase.classification.InterfaceStability;
27 import org.apache.hadoop.hbase.CellScanner;
28 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
29 import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler;
30 import org.apache.hadoop.hbase.regionserver.RSRpcServices;
31 import org.apache.hadoop.hbase.util.Pair;
32 import org.apache.hadoop.security.authorize.PolicyProvider;
33
34 import com.google.common.annotations.VisibleForTesting;
35 import com.google.protobuf.BlockingService;
36 import com.google.protobuf.Descriptors.MethodDescriptor;
37 import com.google.protobuf.Message;
38 import com.google.protobuf.ServiceException;
39
40 @InterfaceAudience.LimitedPrivate({HBaseInterfaceAudience.COPROC, HBaseInterfaceAudience.PHOENIX})
41 @InterfaceStability.Evolving
42 public interface RpcServerInterface {
43 void start();
44 boolean isStarted();
45
46 void stop();
47 void join() throws InterruptedException;
48
49 void setSocketSendBufSize(int size);
50 InetSocketAddress getListenerAddress();
51
52 Pair<Message, CellScanner> call(BlockingService service, MethodDescriptor md,
53 Message param, CellScanner cellScanner, long receiveTime, MonitoredRPCHandler status)
54 throws IOException, ServiceException;
55
56 void setErrorHandler(HBaseRPCErrorHandler handler);
57 HBaseRPCErrorHandler getErrorHandler();
58
59
60
61
62 MetricsHBaseServer getMetrics();
63
64
65
66
67
68
69 void addCallSize(long diff);
70
71
72
73
74
75 @VisibleForTesting
76 void refreshAuthManager(PolicyProvider pp);
77
78 RpcScheduler getScheduler();
79
80 void setRsRpcServices(RSRpcServices rsRpcServices);
81 }