001/** 002 * Copyright The Apache Software Foundation 003 * 004 * Licensed to the Apache Software Foundation (ASF) under one or more 005 * contributor license agreements. See the NOTICE file distributed with this 006 * work for additional information regarding copyright ownership. The ASF 007 * licenses this file to you under the Apache License, Version 2.0 (the 008 * "License"); you may not use this file except in compliance with the License. 009 * You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 015 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 016 * License for the specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.apache.hadoop.hbase.regionserver; 020 021import java.io.IOException; 022 023import org.apache.commons.lang3.NotImplementedException; 024import org.apache.yetus.audience.InterfaceAudience; 025import org.apache.hadoop.hbase.Cell; 026 027/** 028 * A "non-reversed & non-lazy" scanner which does not support backward scanning 029 * and always does a real seek operation. Most scanners are inherited from this 030 * class. 031 */ 032@InterfaceAudience.Private 033public abstract class NonReversedNonLazyKeyValueScanner extends 034 NonLazyKeyValueScanner { 035 036 @Override 037 public boolean backwardSeek(Cell key) throws IOException { 038 throw new NotImplementedException("backwardSeek must not be called on a " 039 + "non-reversed scanner"); 040 } 041 042 @Override 043 public boolean seekToPreviousRow(Cell key) throws IOException { 044 throw new NotImplementedException("seekToPreviousRow must not be called on a " 045 + "non-reversed scanner"); 046 } 047 048 @Override 049 public boolean seekToLastRow() throws IOException { 050 throw new NotImplementedException("seekToLastRow must not be called on a " 051 + "non-reversed scanner"); 052 } 053 054}