1 /** 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 package org.apache.hadoop.hbase.codec.prefixtree.scanner; 20 21 import org.apache.hadoop.classification.InterfaceAudience; 22 import org.apache.hadoop.classification.InterfaceStability; 23 24 /** 25 * An indicator of the state of the scanner after an operation such as nextCell() or 26 * positionAt(..). For example: 27 * <ul> 28 * <li>In a DataBlockScanner, the AFTER_LAST position indicates to the parent StoreFileScanner that 29 * it should load the next block.</li> 30 * <li>In a StoreFileScanner, the AFTER_LAST position indicates that the file has been exhausted. 31 * </li> 32 * <li>In a RegionScanner, the AFTER_LAST position indicates that the scanner should move to the 33 * next region.</li> 34 * </ul> 35 */ 36 @InterfaceAudience.Public 37 @InterfaceStability.Evolving 38 public enum CellScannerPosition { 39 40 /** 41 * getCurrentCell() will NOT return a valid cell. Calling nextCell() will advance to the first 42 * cell. 43 */ 44 BEFORE_FIRST, 45 46 /** 47 * getCurrentCell() will return a valid cell, but it is not the cell requested by positionAt(..), 48 * rather it is the nearest cell before the requested cell. 49 */ 50 BEFORE, 51 52 /** 53 * getCurrentCell() will return a valid cell, and it is exactly the cell that was requested by 54 * positionAt(..). 55 */ 56 AT, 57 58 /** 59 * getCurrentCell() will return a valid cell, but it is not the cell requested by positionAt(..), 60 * rather it is the nearest cell after the requested cell. 61 */ 62 AFTER, 63 64 /** 65 * getCurrentCell() will NOT return a valid cell. Calling nextCell() will have no effect. 66 */ 67 AFTER_LAST 68 69 }