org.apache.hadoop.hbase.client
Class MultiAction<R>

java.lang.Object
  extended by org.apache.hadoop.hbase.client.MultiAction<R>

@InterfaceAudience.Private
public final class MultiAction<R>
extends Object

Container for Actions (i.e. Get, Delete, or Put), which are grouped by regionName. Intended to be used with HConnectionManager.processBatch()


Field Summary
 Map<byte[],List<Action<R>>> actions
           
 
Constructor Summary
MultiAction()
           
 
Method Summary
 void add(byte[] regionName, Action<R> a)
          Add an Action to this container based on it's regionName.
 void add(byte[] regionName, List<Action<R>> a)
          Add an list of Actions to this container based on it's regionName.
 List<Action<R>> allActions()
           
 long getNonceGroup()
           
 Set<byte[]> getRegions()
           
 boolean hasNonceGroup()
           
 void setNonceGroup(long nonceGroup)
           
 int size()
          Get the total number of Actions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actions

public Map<byte[],List<Action<R>>> actions
Constructor Detail

MultiAction

public MultiAction()
Method Detail

size

public int size()
Get the total number of Actions

Returns:
total number of Actions for all groups in this container.

add

public void add(byte[] regionName,
                Action<R> a)
Add an Action to this container based on it's regionName. If the regionName is wrong, the initial execution will fail, but will be automatically retried after looking up the correct region.

Parameters:
regionName -
a -

add

public void add(byte[] regionName,
                List<Action<R>> a)
Add an list of Actions to this container based on it's regionName. If the regionName is wrong, the initial execution will fail, but will be automatically retried after looking up the correct region.

Parameters:
regionName -
a -

setNonceGroup

public void setNonceGroup(long nonceGroup)

getRegions

public Set<byte[]> getRegions()

allActions

public List<Action<R>> allActions()
Returns:
All actions from all regions in this container

hasNonceGroup

public boolean hasNonceGroup()

getNonceGroup

public long getNonceGroup()


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.