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;
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 Cell peek() {
041    return delegate.peek();
042  }
043
044  @Override
045  public Cell next() throws IOException {
046    return delegate.next();
047  }
048
049  @Override
050  public boolean seek(Cell key) throws IOException {
051    return delegate.seek(key);
052  }
053
054  @Override
055  public boolean reseek(Cell 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(Cell kv, boolean forward, boolean useBloom) throws IOException {
076    return delegate.requestSeek(kv, forward, useBloom);
077  }
078
079  @Override
080  public boolean realSeekDone() {
081    return delegate.realSeekDone();
082  }
083
084  @Override
085  public void enforceSeek() throws IOException {
086    delegate.enforceSeek();
087  }
088
089  @Override
090  public boolean isFileScanner() {
091    return delegate.isFileScanner();
092  }
093
094  @Override
095  public Path getFilePath() {
096    return delegate.getFilePath();
097  }
098
099  @Override
100  public boolean backwardSeek(Cell key) throws IOException {
101    return delegate.backwardSeek(key);
102  }
103
104  @Override
105  public boolean seekToPreviousRow(Cell key) throws IOException {
106    return delegate.seekToPreviousRow(key);
107  }
108
109  @Override
110  public boolean seekToLastRow() throws IOException {
111    return delegate.seekToLastRow();
112  }
113
114  @Override
115  public Cell getNextIndexedKey() {
116    return delegate.getNextIndexedKey();
117  }
118}