org.apache.hadoop.hbase.client
Class OperationWithAttributes

java.lang.Object
  extended by org.apache.hadoop.hbase.client.Operation
      extended by org.apache.hadoop.hbase.client.OperationWithAttributes
All Implemented Interfaces:
Attributes
Direct Known Subclasses:
Get, Mutation, Scan

public abstract class OperationWithAttributes
extends Operation
implements Attributes


Constructor Summary
OperationWithAttributes()
           
 
Method Summary
 byte[] getAttribute(String name)
          Gets an attribute
protected  long getAttributeSize()
           
 Map<String,byte[]> getAttributesMap()
          Gets all attributes
protected  void readAttributes(DataInput in)
           
 void setAttribute(String name, byte[] value)
          Sets an attribute.
protected  void writeAttributes(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.hbase.client.Operation
getFingerprint, toJSON, toJSON, toMap, toMap, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OperationWithAttributes

public OperationWithAttributes()
Method Detail

setAttribute

public void setAttribute(String name,
                         byte[] value)
Description copied from interface: Attributes
Sets an attribute. In case value = null attribute is removed from the attributes map.

Specified by:
setAttribute in interface Attributes
Parameters:
name - attribute name
value - attribute value

getAttribute

public byte[] getAttribute(String name)
Description copied from interface: Attributes
Gets an attribute

Specified by:
getAttribute in interface Attributes
Parameters:
name - attribute name
Returns:
attribute value if attribute is set, null otherwise

getAttributesMap

public Map<String,byte[]> getAttributesMap()
Description copied from interface: Attributes
Gets all attributes

Specified by:
getAttributesMap in interface Attributes
Returns:
unmodifiable map of all attributes

getAttributeSize

protected long getAttributeSize()

writeAttributes

protected void writeAttributes(DataOutput out)
                        throws IOException
Throws:
IOException

readAttributes

protected void readAttributes(DataInput in)
                       throws IOException
Throws:
IOException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.