@InterfaceAudience.Private public class TableInfoModel extends Object implements Serializable, ProtobufMessageHandler
<complexType name="TableInfo"> <sequence> <element name="region" type="tns:TableRegion" maxOccurs="unbounded" minOccurs="1"></element> </sequence> <attribute name="name" type="string"></attribute> </complexType>
Modifier and Type | Field and Description |
---|---|
private String |
name |
private List<TableRegionModel> |
regions |
private static long |
serialVersionUID |
Constructor and Description |
---|
TableInfoModel()
Default constructor
|
TableInfoModel(String name)
Constructor n
|
Modifier and Type | Method and Description |
---|---|
void |
add(TableRegionModel region)
Add a region model to the list
|
byte[] |
createProtobufOutput()
Returns the protobuf represention of the model
|
TableRegionModel |
get(int index) |
String |
getName()
Returns the table name
|
ProtobufMessageHandler |
getObjectFromMessage(byte[] message)
Initialize the model from a protobuf representation.
|
List<TableRegionModel> |
getRegions()
Returns the regions
|
void |
setName(String name) |
void |
setRegions(List<TableRegionModel> regions) |
String |
toString() |
private static final long serialVersionUID
private List<TableRegionModel> regions
public TableInfoModel()
public TableInfoModel(String name)
public void add(TableRegionModel region)
region
- the regionpublic TableRegionModel get(int index)
index
- the indexpublic List<TableRegionModel> getRegions()
public void setRegions(List<TableRegionModel> regions)
regions
- the regions to setpublic byte[] createProtobufOutput()
ProtobufMessageHandler
createProtobufOutput
in interface ProtobufMessageHandler
public ProtobufMessageHandler getObjectFromMessage(byte[] message) throws IOException
ProtobufMessageHandler
getObjectFromMessage
in interface ProtobufMessageHandler
message
- the raw bytes of the protobuf messageIOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.