Class Request
- All Implemented Interfaces:
Freeable
- Direct Known Subclasses:
Prequest
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddRecvBufRef(Buffer buf) Adds a receive buffer to this Request object.protected final voidaddSendBufRef(Buffer buf) Adds a send buffer to this Request object.final voidcancel()Mark a pending nonblocking communication for cancellation.voidfree()Set the request object to be void.protected static long[]getHandles(Request[] r) protected static longgetNull()final StatusReturns a status object if the operation identified by the request is complete, or a null reference otherwise.final booleanisNull()Test if request object is null.protected static voidsetHandles(Request[] r, long[] h) final booleantest()Returns true if the operation identified by the request is complete, or false otherwise.static booleanTests for completion of all of the operations associated with active requests.static Status[]testAllStatus(Request[] requests) Tests for completion of all of the operations associated with active requests.static intTests for completion of either one or none of the operations associated with active requests.static StatustestAnyStatus(Request[] requests) Tests for completion of either one or none of the operations associated with active requests.static int[]Behaves likewaitSome, except that it returns immediately.static Status[]testSomeStatus(Request[] requests) Behaves likewaitSome, except that it returns immediately.final StatusReturns a status object if the operation identified by the request is complete, or a null reference otherwise.static voidBlocks until all of the operations associated with the active requests in the array have completed.static Status[]waitAllStatus(Request[] requests) Blocks until all of the operations associated with the active requests in the array have completed.static intBlocks until one of the operations associated with the active requests in the array has completed.static StatuswaitAnyStatus(Request[] requests) Blocks until one of the operations associated with the active requests in the array has completed.final voidwaitFor()Blocks until the operation identified by the request is complete.static int[]Blocks until at least one of the operations associated with the active active requests in the array has completed.static Status[]waitSomeStatus(Request[] requests) Blocks until at least one of the operations associated with the active requests in the array has completed.final StatusBlocks until the operation identified by the request is complete.
-
Field Details
-
handle
protected long handle -
sendBuf
-
recvBuf
-
-
Constructor Details
-
Request
protected Request(long handle)
-
-
Method Details
-
getNull
protected static long getNull() -
free
Set the request object to be void. Java binding of the MPI operationMPI_REQUEST_FREE.- Specified by:
freein interfaceFreeable- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
cancel
Mark a pending nonblocking communication for cancellation. Java binding of the MPI operationMPI_CANCEL.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
addRecvBufRef
Adds a receive buffer to this Request object. This method should be called by the internal api whenever a persistent request is created and any time a request object, that has an associated buffer, is returned from an opperation to protect the buffer from getting prematurely garbage collected.- Parameters:
buf- buffer to add to the array list
-
addSendBufRef
Adds a send buffer to this Request object. This method should be called by the internal api whenever a persistent request is created and any time a request object, that has an associated buffer, is returned from an opperation to protect the buffer from getting prematurely garbage collected.- Parameters:
buf- buffer to add to the array list
-
isNull
public final boolean isNull()Test if request object is null.- Returns:
- true if the request object is null, false otherwise
-
waitStatus
Blocks until the operation identified by the request is complete.Java binding of the MPI operation
MPI_WAIT.After the call returns, the request object becomes inactive.
- Returns:
- status object
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
waitFor
Blocks until the operation identified by the request is complete.Java binding of the MPI operation
MPI_WAIT.After the call returns, the request object becomes inactive.
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
testStatus
Returns a status object if the operation identified by the request is complete, or a null reference otherwise.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.
- Returns:
- status object
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
getStatus
Returns a status object if the operation identified by the request is complete, or a null reference otherwise.Java binding of the MPI operation
MPI_REQUEST_GET_STATUS.After the call, if the operation is complete (ie, if the return value is non-null), the request object remains active.
- Returns:
- status object
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
test
Returns true if the operation identified by the request is complete, or false otherwise.Java binding of the MPI operation
MPI_TEST.After the call, if the operation is complete (ie, if the return value is true), the request object becomes inactive.
- Returns:
- true if the operation identified by the request, false otherwise
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
waitAnyStatus
Blocks until one of the operations associated with the active requests in the array has completed.Java binding of the MPI operation
MPI_WAITANY.The index in array of
requestsfor the request that completed can be obtained from the returned status object through theStatus.getIndex()method. The corresponding element of array ofrequestsbecomes inactive.- Parameters:
requests- array of requests- Returns:
- status object
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
waitAny
Blocks until one of the operations associated with the active requests in the array has completed.Java binding of the MPI operation
MPI_WAITANY.The request that completed becomes inactive.
- Parameters:
requests- array of requests- Returns:
- The index in array of
requestsfor the request that completed. If all of the requests are MPI_REQUEST_NULL, then index is returned asMPI.UNDEFINED. - Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
testAnyStatus
Tests for completion of either one or none of the operations associated with active requests.Java binding of the MPI operation
MPI_TESTANY.If some request completed, the index in array of
requestsfor that request can be obtained from the returned status object. The corresponding element in array ofrequestsbecomes inactive. If no request completed, {testAny} returnsnull.- Parameters:
requests- array of requests- Returns:
- status object if one request completed,
nullotherwise. - Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
testAny
Tests for completion of either one or none of the operations associated with active requests.Java binding of the MPI operation
MPI_TESTANY.If some request completed, ii becomes inactive.
- Parameters:
requests- array of requests- Returns:
- index of operation that completed, or
MPI.UNDEFINEDif none completed. - Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
waitAllStatus
Blocks until all of the operations associated with the active requests in the array have completed.Java binding of the MPI operation
MPI_WAITALL.On exit, requests become inactive. If the input value of array of
requestscontains inactive requests, corresponding elements of the status array will contain null status references.- Parameters:
requests- array of requests- Returns:
- array of statuses
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
waitAll
Blocks until all of the operations associated with the active requests in the array have completed.Java binding of the MPI operation
MPI_WAITALL.- Parameters:
requests- array of requests- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
testAllStatus
Tests for completion of all of the operations associated with active requests.Java binding of the MPI operation
MPI_TESTALL.If all operations have completed, the exit value of the argument array is as for
waitAllStatus.- Parameters:
requests- array of requests- Returns:
- array of statuses if all operations have completed,
nullotherwise. - Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
testAll
Tests for completion of all of the operations associated with active requests.Java binding of the MPI operation
MPI_TESTALL.- Parameters:
requests- array of requests- Returns:
trueif all operations have completed,falseotherwise.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
waitSomeStatus
Blocks until at least one of the operations associated with the active requests in the array has completed.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
requestsfor each request that completed can be obtained from the returned status objects through theStatus.getIndex()method. The corresponding element in array ofrequestsbecomes inactive.- Parameters:
requests- array of requests- Returns:
- array of statuses or
nullif the number of operations completed isMPI_UNDEFINED. - Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
waitSome
Blocks until at least one of the operations associated with the active active requests in the array has completed.Java binding of the MPI operation
MPI_WAITSOME.The size of the result array will be the number of operations that completed. The corresponding element in array of
requestsbecomes inactive.- Parameters:
requests- array of requests- Returns:
- array of indexes of
requeststhat completed ornullif the number of operations completed isMPI_UNDEFINED. - Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
testSomeStatus
Behaves likewaitSome, except that it returns immediately.Java binding of the MPI operation
MPI_TESTSOME.If no operation has completed,
testSomereturns an array of length zero, otherwise the return value are as forwaitSome.- Parameters:
requests- array of requests- Returns:
- array of statuses
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
testSome
Behaves likewaitSome, except that it returns immediately.Java binding of the MPI operation
MPI_TESTSOME.If no operation has completed,
testSomereturns an array of length zero, otherwise the return value are as forwaitSome.- Parameters:
requests- array of requests- Returns:
- array of indexes of
requeststhat completed. - Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
getHandles
-
setHandles
-