001/**
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.apache.hadoop.hbase.ipc;
020
021import java.io.IOException;
022
023public class DelegatingRpcScheduler extends RpcScheduler {
024  protected RpcScheduler delegate;
025
026  public DelegatingRpcScheduler(RpcScheduler delegate) {
027    this.delegate = delegate;
028  }
029
030  @Override
031  public void stop() {
032    delegate.stop();
033  }
034  @Override
035  public void start() {
036    delegate.start();
037  }
038  @Override
039  public void init(Context context) {
040    delegate.init(context);
041  }
042  @Override
043  public int getReplicationQueueLength() {
044    return delegate.getReplicationQueueLength();
045  }
046
047  @Override
048  public int getPriorityQueueLength() {
049    return delegate.getPriorityQueueLength();
050  }
051
052  @Override
053  public int getGeneralQueueLength() {
054    return delegate.getGeneralQueueLength();
055  }
056
057  @Override
058  public int getActiveRpcHandlerCount() {
059    return delegate.getActiveRpcHandlerCount();
060  }
061
062  @Override
063  public int getActiveGeneralRpcHandlerCount() {
064    return delegate.getActiveGeneralRpcHandlerCount();
065  }
066
067  @Override
068  public int getActivePriorityRpcHandlerCount() {
069    return delegate.getActivePriorityRpcHandlerCount();
070  }
071
072  @Override
073  public int getActiveReplicationRpcHandlerCount() {
074    return delegate.getActiveReplicationRpcHandlerCount();
075  }
076
077  @Override
078  public boolean dispatch(CallRunner task) throws IOException, InterruptedException {
079    return delegate.dispatch(task);
080  }
081
082  @Override
083  public int getActiveMetaPriorityRpcHandlerCount() {
084    return delegate.getActiveMetaPriorityRpcHandlerCount();
085  }
086
087  @Override
088  public int getMetaPriorityQueueLength() {
089    return delegate.getMetaPriorityQueueLength();
090  }
091
092  @Override
093  public long getNumGeneralCallsDropped() {
094    return delegate.getNumGeneralCallsDropped();
095  }
096
097  @Override
098  public long getNumLifoModeSwitches() {
099    return delegate.getNumLifoModeSwitches();
100  }
101
102  @Override
103  public int getWriteQueueLength() {
104    return 0;
105  }
106
107  @Override
108  public int getReadQueueLength() {
109    return 0;
110  }
111
112  @Override
113  public int getScanQueueLength() {
114    return 0;
115  }
116
117  @Override
118  public int getActiveWriteRpcHandlerCount() {
119    return 0;
120  }
121
122  @Override
123  public int getActiveReadRpcHandlerCount() {
124    return 0;
125  }
126
127  @Override
128  public int getActiveScanRpcHandlerCount() {
129    return 0;
130  }
131
132  @Override
133  public CallQueueInfo getCallQueueInfo() {
134    return delegate.getCallQueueInfo();
135  }
136}