public class Request
extends java.lang.Object
MPI_REQUEST
.Modifier and Type | Field and Description |
---|---|
long |
handle |
boolean |
isBufferComms |
Constructor and Description |
---|
Request(long commHandle_) |
Request(long commHandle_,
boolean isBufferComms) |
Modifier and Type | Method and Description |
---|---|
void |
addCompletionHandler(mpi.CompletionHandler handler) |
void |
cancel()
Mark a pending nonblocking communication for cancellation.
|
void |
finalize() |
boolean |
isNull()
Test if request object is void.
|
boolean |
mpjdev_cancel() |
void |
mpjdev_free() |
boolean |
mpjdev_isnull() |
boolean |
test()
Returns a status object if the operation identified by the request is complete, or a null
reference otherwise.
|
static boolean |
testAll(Request[] r)
Tests for completion of all of the operations associated with active requests.
|
static Status[] |
testAllStatus(Request[] r)
Tests for completion of all of the operations associated with active requests.
|
static Status |
testAnyStatus(Request[] r)
Tests for completion of either one or none of the operations associated with active requests.
|
static Status[] |
testSomeStatus(Request[] r)
Behaves like
Waitsome , except that it returns immediately. |
Status |
testStatus()
Returns a status object if the operation identified by the request is complete, or a null
reference otherwise.
|
static void |
waitAll(Request[] r)
Blocks until all of the operations associated with the active requests in the array have
completed.
|
static Status[] |
waitAllStatus(Request[] r)
Blocks until all of the operations associated with the active requests in the array have
completed.
|
static Status |
waitAnyStatus(Request[] r)
Blocks until one of the operations associated with the active requests in the array has
completed.
|
boolean |
waitFor()
Blocks until the operation identified by the request is complete.
|
static Status[] |
waitSomeStatus(Request[] r)
Blocks until at least one of the operations associated with the active requests in the array
has completed.
|
Status |
waitStatus()
Blocks until the operation identified by the request is complete.
|
public Request(long commHandle_)
public Request(long commHandle_, boolean isBufferComms)
public static Status testAnyStatus(Request[] r) throws MPIException
r
- array of requests.Java binding of the MPI operation MPI_TESTANY
.
If some request completed, the index in array_of_requests
for that request can be
obtained from the returned status object through the. The corresponding element of
array_of_requests
becomes inactive. If no request completed, Testany
returns
a null reference.
MPIException
- Points out that an MPI exception has occured.public static void waitAll(Request[] r) throws MPIException
r
- array of requests.
Java binding of the MPI operation MPI_WAITALL
.
The result array will be the same size as array_of_requests
. On exit, requests
become inactive. If the input value of arrayOfRequests
contains inactive
requests, corresponding elements of the result array will contain null status references.
MPIException
- Points out that an MPI exception has occured.public static Status[] waitAllStatus(Request[] r) throws MPIException
r
- array of requests.Java binding of the MPI operation MPI_WAITALL
.
The result array will be the same size as array_of_requests
. On exit, requests
become inactive. If the input value of arrayOfRequests
contains inactive
requests, corresponding elements of the result array will contain null status references.
MPIException
- Points out that an MPI exception has occured.public static Status waitAnyStatus(Request[] r) throws MPIException
r
- array of requests.Java binding of the MPI operation MPI_WAITANY
.
The index in array_of_requests
for the request that completed can be obtained from
the returned status object through the Status.index
field. The corresponding element
of array_of_requests
becomes inactive.
MPIException
- Points out that an MPI exception has occured.public static boolean testAll(Request[] r) throws MPIException
r
- array of requests.Java binding of the MPI operation MPI_TESTALL
.
If all operations have completed, the exit value of the argument array and the result array
are as for Waitall
. If any operation has not completed, the result value is null and
no element of the argument array is modified.
MPIException
- Points out that an MPI exception has occured.public static Status[] testAllStatus(Request[] r) throws MPIException
r
- array of requests.Java binding of the MPI operation MPI_TESTALL
.
If all operations have completed, the exit value of the argument array and the result array
are as for Waitall
. If any operation has not completed, the result value is null and
no element of the argument array is modified.
MPIException
- Points out that an MPI exception has occured.public static Status[] waitSomeStatus(Request[] r) throws MPIException
r
- array of requests.Java binding of the MPI operation MPI_WAITSOME
.
The size of the result array will be the number of operations that completed. The index in
array_of_requests
for each request that completed can be obtained from the returned
status objects through the Status.index
field. The corresponding element in
array_of_requests
becomes inactive.
MPIException
- Points out that an MPI exception has occured.public static Status[] testSomeStatus(Request[] r) throws MPIException
Waitsome
, except that it returns immediately.r
- array of requests.Java binding of the MPI operation MPI_TESTSOME
.
If no operation has completed, TestSome
returns an array of length zero and
elements of array_of_requests
are unchanged. Otherwise, arguments and return value are
as for Waitsome
.
MPIException
- Points out that an MPI exception has occured.public boolean waitFor() throws MPIException
Java binding of the MPI operation MPI_WAIT
.
After the call returns, the request object becomes inactive.
MPIException
- Points out that an MPI exception has occured.public Status waitStatus() throws MPIException
Java binding of the MPI operation MPI_WAIT
.
After the call returns, the request object becomes inactive.
MPIException
- Points out that an MPI exception has occured.public boolean test() throws MPIException
Java binding of the MPI operation MPI_TEST
.
After the call, if the operation is complete (ie, if the return value is non-null), the request object becomes inactive.
MPIException
- Points out that an MPI exception has occured.public Status testStatus() throws MPIException
Java binding of the MPI operation MPI_TEST
.
After the call, if the operation is complete (ie, if the return value is non-null), the request object becomes inactive.
MPIException
- Points out that an MPI exception has occured.public void finalize() throws MPIException
finalize
in class java.lang.Object
MPIException
public boolean isNull() throws MPIException
true
if the request object is void,
otherwise false
.MPIException
- Points out that an MPI exception has occured.public void cancel() throws MPIException
Java binding of the MPI operation MPI_CANCEL
.
MPIException
- Points out that an MPI exception has occured.public boolean mpjdev_cancel()
public boolean mpjdev_isnull()
public void mpjdev_free()
public void addCompletionHandler(mpi.CompletionHandler handler)