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.util.Pair;
31 import org.apache.hadoop.security.authorize.PolicyProvider;
32
33 import com.google.common.annotations.VisibleForTesting;
34 import com.google.protobuf.BlockingService;
35 import com.google.protobuf.Descriptors.MethodDescriptor;
36 import com.google.protobuf.Message;
37 import com.google.protobuf.ServiceException;
38
39 @InterfaceAudience.LimitedPrivate({HBaseInterfaceAudience.COPROC, HBaseInterfaceAudience.PHOENIX})
40 @InterfaceStability.Evolving
41 public interface RpcServerInterface {
42 void start();
43 boolean isStarted();
44
45 void stop();
46 void join() throws InterruptedException;
47
48 void setSocketSendBufSize(int size);
49 InetSocketAddress getListenerAddress();
50
51 Pair<Message, CellScanner> call(BlockingService service, MethodDescriptor md,
52 Message param, CellScanner cellScanner, long receiveTime, MonitoredRPCHandler status)
53 throws IOException, ServiceException;
54
55 void setErrorHandler(HBaseRPCErrorHandler handler);
56 HBaseRPCErrorHandler getErrorHandler();
57
58
59
60
61 MetricsHBaseServer getMetrics();
62
63
64
65
66
67
68 void addCallSize(long diff);
69
70
71
72
73
74 @VisibleForTesting
75 void refreshAuthManager(PolicyProvider pp);
76
77 RpcScheduler getScheduler();
78 }