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