-
- public void unschedule() {
- try {
- schedEnd.release();
- schedBegin.acquire();
- } catch(InterruptedException e) {
- }
- }
-
- public void schedule() {
- try {
- schedBegin.release();
- schedEnd.acquire();
- } catch(InterruptedException e) {
- }
- }
-
- /** Send the given task in the mailbox associated with the specified alias (waiting at most given time)
- * @throws TimeoutException
- * @throws HostFailureException
- * @throws TransferFailureException */
- public void taskSend(String mailbox, Task task, double timeout) throws TransferFailureException, HostFailureException, TimeoutException {
- MsgNative.taskSend(mailbox, task, timeout);
- }
-
- /** Send the given task in the mailbox associated with the specified alias
- * @throws TimeoutException
- * @throws HostFailureException
- * @throws TransferFailureException */
- public void taskSend(String mailbox, Task task) throws TransferFailureException, HostFailureException, TimeoutException {
- MsgNative.taskSend(mailbox, task, -1);
- }
-
- /** Receive a task on mailbox associated with the specified mailbox */
- public Task taskReceive(String mailbox) throws TransferFailureException, HostFailureException, TimeoutException {
- return MsgNative.taskReceive(mailbox, -1.0, null);
- }
-
- /** Receive a task on mailbox associated with the specified alias (waiting at most given time) */
- public Task taskReceive(String mailbox, double timeout) throws TransferFailureException, HostFailureException, TimeoutException {
- return MsgNative.taskReceive(mailbox, timeout, null);
- }
-
- /** Receive a task on mailbox associated with the specified alias from given sender */
- public Task taskReceive(String mailbox, double timeout, Host host) throws TransferFailureException, HostFailureException, TimeoutException {
- return MsgNative.taskReceive(mailbox, timeout, host);
- }
-
- /** Receive a task on mailbox associated with the specified alias from given sender*/
- public Task taskReceive(String mailbox, Host host) throws TransferFailureException, HostFailureException, TimeoutException {
- return MsgNative.taskReceive(mailbox, -1.0, host);