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 boolean dispatch(CallRunner task) throws IOException, InterruptedException {
64      return delegate.dispatch(task);
65    }
66  
67    @Override
68    public long getNumGeneralCallsDropped() {
69      return delegate.getNumGeneralCallsDropped();
70    }
71  
72    @Override
73    public long getNumLifoModeSwitches() {
74      return delegate.getNumLifoModeSwitches();
75    }
76  }