/** {@inheritDoc} */ @Override public void sendNoFuture(Object msg, IgniteInClosure<IgniteException> ackC) throws IgniteCheckedException { try { chain().onSessionWrite(this, msg, false, ackC); } catch (IgniteCheckedException e) { close(); throw e; } }
/** {@inheritDoc} */ @Override public GridNioFuture<?> resumeReads() { try { return chain().onResumeReads(this); } catch (IgniteCheckedException e) { close(); return new GridNioFinishedFuture<Object>(e); } }
/** {@inheritDoc} */ @Override public GridNioFuture<?> pauseReads() { try { return chain().onPauseReads(this); } catch (IgniteCheckedException e) { close(); return new GridNioFinishedFuture<Object>(e); } }
/** {@inheritDoc} */ @Override public GridNioFuture<?> send(Object msg) { try { resetSendScheduleTime(); return chain().onSessionWrite(this, msg, true, null); } catch (IgniteCheckedException e) { close(); return new GridNioFinishedFuture<Object>(e); } }
/** {@inheritDoc} */ @Override public GridNioFuture<Boolean> close() { GridNioFuture<Boolean> fut = super.close(); if (!fut.isDone()) { fut.listen(fut0 -> { try { fut0.get(); } catch (IgniteCheckedException e) { log.error("Failed to close session [ses=" + GridSelectorNioSessionImpl.this + ']', e); } }); } else if (fut.error() != null) log.error("Failed to close session [ses=" + GridSelectorNioSessionImpl.this + ']', fut.error()); return fut; }
/** {@inheritDoc} */ @Override public void sendNoFuture(Object msg, IgniteInClosure<IgniteException> ackC) throws IgniteCheckedException { try { chain().onSessionWrite(this, msg, false, ackC); } catch (IgniteCheckedException e) { close(); throw e; } }
/** {@inheritDoc} */ @Override public GridNioFuture<?> pauseReads() { try { return chain().onPauseReads(this); } catch (IgniteCheckedException e) { close(); return new GridNioFinishedFuture<Object>(e); } }
/** {@inheritDoc} */ @Override public GridNioFuture<?> resumeReads() { try { return chain().onResumeReads(this); } catch (IgniteCheckedException e) { close(); return new GridNioFinishedFuture<Object>(e); } }
/** {@inheritDoc} */ @Override public GridNioFuture<?> send(Object msg) { try { resetSendScheduleTime(); return chain().onSessionWrite(this, msg, true, null); } catch (IgniteCheckedException e) { close(); return new GridNioFinishedFuture<Object>(e); } }
/** {@inheritDoc} */ @Override public GridNioFuture<Boolean> close() { GridNioFuture<Boolean> fut = super.close(); if (!fut.isDone()) { fut.listen(fut0 -> { try { fut0.get(); } catch (IgniteCheckedException e) { log.error("Failed to close session [ses=" + GridSelectorNioSessionImpl.this + ']', e); } }); } else if (fut.error() != null) log.error("Failed to close session [ses=" + GridSelectorNioSessionImpl.this + ']', fut.error()); return fut; }