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.regionserver;
019
020import java.io.IOException;
021import java.util.function.IntConsumer;
022import org.apache.hadoop.fs.Path;
023import org.apache.hadoop.hbase.Cell;
024import org.apache.hadoop.hbase.client.Scan;
025
026public class DelegatingKeyValueScanner implements KeyValueScanner {
027  protected KeyValueScanner delegate;
028
029  public DelegatingKeyValueScanner(KeyValueScanner delegate) {
030    this.delegate = delegate;
031  }
032
033  @Override
034  public void shipped() throws IOException {
035    delegate.shipped();
036  }
037
038  @Override
039  public Cell peek() {
040    return delegate.peek();
041  }
042
043  @Override
044  public Cell next() throws IOException {
045    return delegate.next();
046  }
047
048  @Override
049  public boolean seek(Cell key) throws IOException {
050    return delegate.seek(key);
051  }
052
053  @Override
054  public boolean reseek(Cell key) throws IOException {
055    return delegate.reseek(key);
056  }
057
058  @Override
059  public long getScannerOrder() {
060    return delegate.getScannerOrder();
061  }
062
063  @Override
064  public void close() {
065    delegate.close();
066  }
067
068  @Override
069  public boolean shouldUseScanner(Scan scan, HStore store, long oldestUnexpiredTS) {
070    return delegate.shouldUseScanner(scan, store, oldestUnexpiredTS);
071  }
072
073  @Override
074  public boolean requestSeek(Cell kv, boolean forward, boolean useBloom) throws IOException {
075    return delegate.requestSeek(kv, forward, useBloom);
076  }
077
078  @Override
079  public boolean realSeekDone() {
080    return delegate.realSeekDone();
081  }
082
083  @Override
084  public void enforceSeek() throws IOException {
085    delegate.enforceSeek();
086  }
087
088  @Override
089  public boolean isFileScanner() {
090    return delegate.isFileScanner();
091  }
092
093  @Override
094  public Path getFilePath() {
095    return delegate.getFilePath();
096  }
097
098  @Override
099  public boolean backwardSeek(Cell key) throws IOException {
100    return delegate.backwardSeek(key);
101  }
102
103  @Override
104  public boolean seekToPreviousRow(Cell key) throws IOException {
105    return delegate.seekToPreviousRow(key);
106  }
107
108  @Override
109  public boolean seekToLastRow() throws IOException {
110    return delegate.seekToLastRow();
111  }
112
113  @Override
114  public Cell getNextIndexedKey() {
115    return delegate.getNextIndexedKey();
116  }
117
118  @Override
119  public void recordBlockSize(IntConsumer blockSizeConsumer) {
120    delegate.recordBlockSize(blockSizeConsumer);
121  }
122}