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 */
018package org.apache.hadoop.hbase.ipc;
019
020public class DelegatingRpcScheduler extends RpcScheduler {
021  protected RpcScheduler delegate;
022
023  public DelegatingRpcScheduler(RpcScheduler delegate) {
024    this.delegate = delegate;
025  }
026
027  @Override
028  public void stop() {
029    delegate.stop();
030  }
031
032  @Override
033  public void start() {
034    delegate.start();
035  }
036
037  @Override
038  public void init(Context context) {
039    delegate.init(context);
040  }
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) {
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}