HBASE-24609 Move MetaTableAccessor out of hbase-client (#1943)
[hbase.git] / hbase-server / src / main / java / org / apache / hadoop / hbase / regionserver / OnlineRegions.java
blob25594b79cc1b8effe8a0d5ffa5157759b6b7c866
1 /**
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 package org.apache.hadoop.hbase.regionserver;
21 import java.io.IOException;
22 import java.util.List;
24 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
25 import org.apache.hadoop.hbase.TableName;
26 import org.apache.yetus.audience.InterfaceAudience;
27 import org.apache.yetus.audience.InterfaceStability;
29 /**
30 * Provides read-only access to the Regions presently online on the
31 * current RegionServer
33 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
34 @InterfaceStability.Evolving
35 public interface OnlineRegions {
37 /**
38 * Return {@link Region} instance.
39 * Only works if caller is in same context, in same JVM. Region is not
40 * serializable.
41 * @param encodedRegionName
42 * @return Region for the passed encoded <code>encodedRegionName</code> or
43 * null if named region is not member of the online regions.
45 Region getRegion(String encodedRegionName);
47 /**
48 * Get all online regions of a table in this RS.
49 * @param tableName
50 * @return List of Region
51 * @throws java.io.IOException
53 List<? extends Region> getRegions(TableName tableName) throws IOException;
55 /**
56 * Get all online regions in this RS.
57 * @return List of online Region
59 List<? extends Region> getRegions();