@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>
Constructor and Description |
---|
TableInfoModel()
Default constructor
|
TableInfoModel(String name)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(TableRegionModel region)
Add a region model to the list
|
byte[] |
createProtobufOutput() |
TableRegionModel |
get(int index) |
String |
getName() |
ProtobufMessageHandler |
getObjectFromMessage(byte[] message)
Initialize the model from a protobuf representation.
|
List<TableRegionModel> |
getRegions() |
void |
setName(String name) |
void |
setRegions(List<TableRegionModel> regions) |
String |
toString() |
public TableInfoModel()
public TableInfoModel(String name)
name
- public void add(TableRegionModel region)
region
- the regionpublic TableRegionModel get(int index)
index
- the indexpublic String getName()
public List<TableRegionModel> getRegions()
public void setName(String name)
name
- the table namepublic void setRegions(List<TableRegionModel> regions)
regions
- the regions to setpublic byte[] createProtobufOutput()
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–2019 Cloudera. All rights reserved.