public void suspend ( final byte [ ] message ) { synchronized ( this . heartBeatManager ) { if ( this . currentStatus . isNotRunning ( ) ) { LOG . log ( Level . WARNING , "Trying to suspend a task that is in state: {0}. Ignoring." , this . currentStatus . getState ( ) ) ; } else { try { this . suspendTask ( message ) ; this . currentStatus . setSuspendRequested ( ) ; } catch ( final TaskSuspendHandlerFailure taskSuspendHandlerFailure ) { LOG . log ( Level . WARNING , "Exception while executing task suspend handler." , taskSuspendHandlerFailure . getCause ( ) ) ; this . currentStatus . setException ( taskSuspendHandlerFailure . getCause ( ) ) ; } } } }
Suspend the Task . This calls the configured suspend handler .