|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.client.coprocessor.Batch
public abstract class Batch
A collection of interfaces and utilities used for interacting with custom RPC interfaces exposed by Coprocessors.
Nested Class Summary | |
---|---|
static interface |
Batch.Call<T,R>
Defines a unit of work to be executed. |
static interface |
Batch.Callback<R>
Defines a generic callback to be triggered for each Batch.Call.call(Object)
result. |
Constructor Summary | |
---|---|
Batch()
|
Method Summary | ||
---|---|---|
static
|
forMethod(Class<T> protocol,
String method,
Object... args)
Creates a new Batch.Call instance that invokes a method
with the given parameters and returns the result. |
|
static
|
forMethod(Method method,
Object... args)
Creates a new Batch.Call instance that invokes a method
with the given parameters and returns the result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Batch()
Method Detail |
---|
public static <T extends CoprocessorProtocol,R> Batch.Call<T,R> forMethod(Class<T> protocol, String method, Object... args) throws NoSuchMethodException
Batch.Call
instance that invokes a method
with the given parameters and returns the result.
Note that currently the method is naively looked up using the method name
and class types of the passed arguments, which means that
none of the arguments can be null
.
For more flexibility, see
forMethod(java.lang.reflect.Method, Object...)
.
T
- the class type of the protocol implementation being invokedR
- the return type for the method callprotocol
- the protocol class being calledmethod
- the method nameargs
- zero or more arguments to be passed to the method
(individual args cannot be null
!)
Callable
instance that will invoke the given method
and return the results
NoSuchMethodException
- if the method named, with the given argument
types, cannot be found in the protocol classforMethod(java.lang.reflect.Method, Object...)
,
HTable.coprocessorExec(Class, byte[], byte[], org.apache.hadoop.hbase.client.coprocessor.Batch.Call, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback)
public static <T extends CoprocessorProtocol,R> Batch.Call<T,R> forMethod(Method method, Object... args)
Batch.Call
instance that invokes a method
with the given parameters and returns the result.
T
- the class type of the protocol implementation being invokedR
- the return type for the method callmethod
- the method reference to invokeargs
- zero or more arguments to be passed to the method
Callable
instance that will invoke the given method and
return the resultsHTable.coprocessorExec(Class, byte[], byte[], org.apache.hadoop.hbase.client.coprocessor.Batch.Call, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |