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