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