org.apache.hadoop.hbase.rest.model
Class NamespacesModel

java.lang.Object
  extended by org.apache.hadoop.hbase.rest.model.NamespacesModel
All Implemented Interfaces:
Serializable, ProtobufMessageHandler

@InterfaceAudience.Private
public class NamespacesModel
extends Object
implements Serializable, ProtobufMessageHandler

A list of HBase namespaces.

See Also:
Serialized Form

Constructor Summary
NamespacesModel()
          Default constructor.
NamespacesModel(HBaseAdmin admin)
          Constructor
 
Method Summary
 byte[] createProtobufOutput()
           
 List<String> getNamespaces()
           
 ProtobufMessageHandler getObjectFromMessage(byte[] message)
          Initialize the model from a protobuf representation.
 void setNamespaces(List<String> namespaces)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamespacesModel

public NamespacesModel()
Default constructor. Do not use.


NamespacesModel

public NamespacesModel(HBaseAdmin admin)
                throws IOException
Constructor

Parameters:
admin: - the administrative API
Throws:
IOException
Method Detail

getNamespaces

public List<String> getNamespaces()
Returns:
all namespaces

setNamespaces

public void setNamespaces(List<String> namespaces)
Parameters:
namespaces - the namespace name array

toString

public String toString()
Overrides:
toString in class Object

createProtobufOutput

public byte[] createProtobufOutput()
Specified by:
createProtobufOutput in interface ProtobufMessageHandler
Returns:
the protobuf represention of the model

getObjectFromMessage

public ProtobufMessageHandler getObjectFromMessage(byte[] message)
                                            throws IOException
Description copied from interface: ProtobufMessageHandler
Initialize the model from a protobuf representation.

Specified by:
getObjectFromMessage in interface ProtobufMessageHandler
Parameters:
message - the raw bytes of the protobuf message
Returns:
reference to self for convenience
Throws:
IOException


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.