1 /* 2 * Copyright 2010 The Apache Software Foundation 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.apache.hadoop.hbase; 18 19 import java.io.IOException; 20 21 import org.apache.hadoop.conf.Configuration; 22 import org.apache.hadoop.hbase.client.HTableInterface; 23 24 /** 25 * Coprocessor environment state. 26 */ 27 public interface CoprocessorEnvironment { 28 29 /** @return the Coprocessor interface version */ 30 public int getVersion(); 31 32 /** @return the HBase version as a string (e.g. "0.21.0") */ 33 public String getHBaseVersion(); 34 35 /** @return the loaded coprocessor instance */ 36 public Coprocessor getInstance(); 37 38 /** @return the priority assigned to the loaded coprocessor */ 39 public int getPriority(); 40 41 /** @return the load sequence number */ 42 public int getLoadSequence(); 43 44 /** @return the configuration */ 45 public Configuration getConfiguration(); 46 47 /** 48 * @return an interface for accessing the given table 49 * @throws IOException 50 */ 51 public HTableInterface getTable(byte[] tableName) throws IOException; 52 }