HBASE-26688 Threads shared EMPTY_RESULT may lead to unexpected client job down. ...
[hbase.git] / hbase-client / src / main / java / org / apache / hadoop / hbase / CoprocessorEnvironment.java
blob4fab7333dcd9498fda2ccdcc758ad8f9caaee511
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
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
20 package org.apache.hadoop.hbase;
22 import org.apache.hadoop.conf.Configuration;
23 import org.apache.yetus.audience.InterfaceAudience;
24 import org.apache.yetus.audience.InterfaceStability;
26 /**
27 * Coprocessor environment state.
29 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
30 @InterfaceStability.Evolving
31 public interface CoprocessorEnvironment<C extends Coprocessor> {
33 /** @return the Coprocessor interface version */
34 int getVersion();
36 /** @return the HBase version as a string (e.g. "0.21.0") */
37 String getHBaseVersion();
39 /** @return the loaded coprocessor instance */
40 C getInstance();
42 /** @return the priority assigned to the loaded coprocessor */
43 int getPriority();
45 /** @return the load sequence number */
46 int getLoadSequence();
48 /**
49 * @return a Read-only Configuration; throws {@link UnsupportedOperationException} if you try
50 * to set a configuration.
52 Configuration getConfiguration();
54 /**
55 * @return the classloader for the loaded coprocessor instance
57 ClassLoader getClassLoader();