/** * Cancel the Future * */ public void cancel() { // set the cancel flag first cancelled = true; // Notify the future try { set( null ); } catch ( InterruptedException ie ) { // Nothing we can do } }
/** * Cancel the Future * */ public void cancel() { // set the cancel flag first cancelled = true; // Notify the future try { set( null ); } catch ( InterruptedException ie ) { // Nothing we can do } }
/** * Cancel the Future * */ public void cancel() { // set the cancel flag first cancelled = true; // Notify the future try { set( null ); } catch ( InterruptedException ie ) { // Nothing we can do } }
/** * {@inheritDoc} */ @Override public boolean cancel( boolean mayInterruptIfRunning ) { if ( cancelled ) { return cancelled; } // set the cancel flag first cancelled = true; // Send an abandonRequest only if this future exists if ( !connection.isRequestCompleted( messageId ) ) { connection.abandon( messageId ); } // Notify the future try { set( null ); } catch ( InterruptedException ie ) { // Nothing we can do } return cancelled; }
/** * {@inheritDoc} */ @Override public boolean cancel( boolean mayInterruptIfRunning ) { if ( cancelled ) { return cancelled; } // set the cancel flag first cancelled = true; // Send an abandonRequest only if this future exists if ( !connection.isRequestCompleted( messageId ) ) { connection.abandon( messageId ); } // Notify the future try { set( null ); } catch ( InterruptedException ie ) { // Nothing we can do } return cancelled; }
/** * {@inheritDoc} */ @Override public boolean cancel( boolean mayInterruptIfRunning ) { if ( cancelled ) { return cancelled; } // set the cancel flag first cancelled = true; // Send an abandonRequest only if this future exists if ( !connection.isRequestCompleted( messageId ) ) { connection.abandon( messageId ); } // Notify the future try { set( null ); } catch ( InterruptedException ie ) { // Nothing we can do } return cancelled; }