org.apache.cassandra.net
Class MultiAsyncResult

java.lang.Object
  extended by org.apache.cassandra.net.MultiAsyncResult
All Implemented Interfaces:
IAsyncResult

public class MultiAsyncResult
extends java.lang.Object
implements IAsyncResult


Method Summary
 byte[] get()
          Returns the result for the task that was submitted.
 byte[] get(long timeout, java.util.concurrent.TimeUnit tu)
          Same operation as the above get() but allows the calling thread to specify a timeout.
 boolean isDone()
          This is used to check if the task has been completed
 java.util.List<byte[]> multiget()
          Returns the result for all tasks that was submitted.
 java.util.List<byte[]> multiget(long timeout, java.util.concurrent.TimeUnit tu)
          Same operation as the above get() but allows the calling thread to specify a timeout.
 void result(Message result)
          Store the result obtained for the submitted task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public byte[] get()
Description copied from interface: IAsyncResult
Returns the result for the task that was submitted.

Specified by:
get in interface IAsyncResult
Returns:
the result wrapped in an Object[]

get

public byte[] get(long timeout,
                  java.util.concurrent.TimeUnit tu)
           throws java.util.concurrent.TimeoutException
Description copied from interface: IAsyncResult
Same operation as the above get() but allows the calling thread to specify a timeout.

Specified by:
get in interface IAsyncResult
Parameters:
timeout - the maximum time to wait
tu - the time unit of the timeout argument
Returns:
the result wrapped in an Object[]
Throws:
java.util.concurrent.TimeoutException

multiget

public java.util.List<byte[]> multiget()
Description copied from interface: IAsyncResult
Returns the result for all tasks that was submitted.

Specified by:
multiget in interface IAsyncResult
Returns:
the list of results wrapped in an Object[]

isDone

public boolean isDone()
Description copied from interface: IAsyncResult
This is used to check if the task has been completed

Specified by:
isDone in interface IAsyncResult
Returns:
true if the task has been completed and false otherwise.

multiget

public java.util.List<byte[]> multiget(long timeout,
                                       java.util.concurrent.TimeUnit tu)
                                throws java.util.concurrent.TimeoutException
Description copied from interface: IAsyncResult
Same operation as the above get() but allows the calling thread to specify a timeout.

Specified by:
multiget in interface IAsyncResult
Parameters:
timeout - the maximum time to wait
tu - the time unit of the timeout argument
Returns:
the result wrapped in an Object[]
Throws:
java.util.concurrent.TimeoutException

result

public void result(Message result)
Description copied from interface: IAsyncResult
Store the result obtained for the submitted task.

Specified by:
result in interface IAsyncResult
Parameters:
result - the response message


Copyright © 2009 The Apache Software Foundation