Class TableInfoModel
java.lang.Object
org.apache.hadoop.hbase.rest.model.TableInfoModel
- All Implemented Interfaces:
Serializable
,ProtobufMessageHandler
Representation of a list of table regions.
<complexType name="TableInfo"> <sequence> <element name="region" type="tns:TableRegion" maxOccurs="unbounded" minOccurs="1"></element> </sequence> <attribute name="name" type="string"></attribute> </complexType>
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate String
private List<TableRegionModel>
private static final long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(TableRegionModel region) Add a region model to the listbyte[]
Returns the protobuf represention of the modelget
(int index) getName()
Returns the table namegetObjectFromMessage
(byte[] message) Initialize the model from a protobuf representation.Returns the regionsvoid
void
setRegions
(List<TableRegionModel> regions) toString()
-
Field Details
-
serialVersionUID
- See Also:
-
name
-
regions
-
-
Constructor Details
-
TableInfoModel
public TableInfoModel()Default constructor -
TableInfoModel
Constructor
-
-
Method Details
-
add
Add a region model to the list- Parameters:
region
- the region
-
get
- Parameters:
index
- the index- Returns:
- the region model
-
getName
Returns the table name -
getRegions
Returns the regions -
setName
- Parameters:
name
- the table name
-
setRegions
- Parameters:
regions
- the regions to set
-
toString
-
createProtobufOutput
Description copied from interface:ProtobufMessageHandler
Returns the protobuf represention of the model- Specified by:
createProtobufOutput
in interfaceProtobufMessageHandler
-
getObjectFromMessage
Description copied from interface:ProtobufMessageHandler
Initialize the model from a protobuf representation.- Specified by:
getObjectFromMessage
in interfaceProtobufMessageHandler
- Parameters:
message
- the raw bytes of the protobuf message- Returns:
- reference to self for convenience
- Throws:
IOException
-