View Javadoc

1   /**
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *     http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  package org.apache.hadoop.hbase.ipc;
20  
21  import java.io.IOException;
22  
23  public class DelegatingRpcScheduler extends RpcScheduler {
24    protected RpcScheduler delegate;
25  
26    public DelegatingRpcScheduler(RpcScheduler delegate) {
27      this.delegate = delegate;
28    }
29  
30    @Override
31    public void stop() {
32      delegate.stop();
33    }
34    @Override
35    public void start() {
36      delegate.start();
37    }
38    @Override
39    public void init(Context context) {
40      delegate.init(context);
41    }
42    @Override
43    public int getReplicationQueueLength() {
44      return delegate.getReplicationQueueLength();
45    }
46  
47    @Override
48    public int getPriorityQueueLength() {
49      return delegate.getPriorityQueueLength();
50    }
51  
52    @Override
53    public int getGeneralQueueLength() {
54      return delegate.getGeneralQueueLength();
55    }
56  
57    @Override
58    public int getActiveRpcHandlerCount() {
59      return delegate.getActiveRpcHandlerCount();
60    }
61  
62    @Override
63    public int getActiveGeneralRpcHandlerCount() {
64      return delegate.getActiveGeneralRpcHandlerCount();
65    }
66  
67    @Override
68    public int getActivePriorityRpcHandlerCount() {
69      return delegate.getActivePriorityRpcHandlerCount();
70    }
71  
72    @Override
73    public int getActiveReplicationRpcHandlerCount() {
74      return delegate.getActiveReplicationRpcHandlerCount();
75    }
76  
77    @Override
78    public boolean dispatch(CallRunner task) throws IOException, InterruptedException {
79      return delegate.dispatch(task);
80    }
81  
82    @Override
83    public long getNumGeneralCallsDropped() {
84      return delegate.getNumGeneralCallsDropped();
85    }
86  
87    @Override
88    public long getNumLifoModeSwitches() {
89      return delegate.getNumLifoModeSwitches();
90    }
91  
92    @Override
93    public int getWriteQueueLength() {
94      return 0;
95    }
96  
97    @Override
98    public int getReadQueueLength() {
99      return 0;
100   }
101 
102   @Override
103   public int getScanQueueLength() {
104     return 0;
105   }
106 
107   @Override
108   public int getActiveWriteRpcHandlerCount() {
109     return 0;
110   }
111 
112   @Override
113   public int getActiveReadRpcHandlerCount() {
114     return 0;
115   }
116 
117   @Override
118   public int getActiveScanRpcHandlerCount() {
119     return 0;
120   }
121 }