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