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, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019 020package org.apache.hadoop.hbase; 021 022import org.apache.hadoop.conf.Configuration; 023import org.apache.yetus.audience.InterfaceAudience; 024import org.apache.yetus.audience.InterfaceStability; 025 026/** 027 * Coprocessor environment state. 028 */ 029@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC) 030@InterfaceStability.Evolving 031public interface CoprocessorEnvironment<C extends Coprocessor> { 032 033 /** @return the Coprocessor interface version */ 034 int getVersion(); 035 036 /** @return the HBase version as a string (e.g. "0.21.0") */ 037 String getHBaseVersion(); 038 039 /** @return the loaded coprocessor instance */ 040 C getInstance(); 041 042 /** @return the priority assigned to the loaded coprocessor */ 043 int getPriority(); 044 045 /** @return the load sequence number */ 046 int getLoadSequence(); 047 048 /** 049 * @return a Read-only Configuration; throws {@link UnsupportedOperationException} if you try 050 * to set a configuration. 051 */ 052 Configuration getConfiguration(); 053 054 /** 055 * @return the classloader for the loaded coprocessor instance 056 */ 057 ClassLoader getClassLoader(); 058}