private boolean changeState(State oldState, State newState) { boolean result = this.state.compareAndSet(oldState, newState); if (result && rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + oldState + " -> " + newState); } return result; }
@Override public final void onNext(T data) { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "Item to write"); } this.state.get().onNext(this, data); }
/** * Invoked when writing is possible, either in the same thread after a check * via {@link #isWritePossible()}, or as a callback from the underlying * container. */ public final void onWritePossible() { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "onWritePossible"); } this.state.get().onWritePossible(this); }
/** * Invoked during an error or completion callback from the underlying * container to cancel the upstream subscription. */ public void cancel() { rsWriteLogger.trace(getLogPrefix() + "Cancellation"); if (this.subscription != null) { this.subscription.cancel(); } }
/** * Error signal from the upstream, write Publisher. This is also used by * sub-classes to delegate error notifications from the container. */ @Override public final void onError(Throwable ex) { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "Write source error: " + ex); } this.state.get().onError(this, ex); }
/** * Completion signal from the upstream, write Publisher. This is also used * by sub-classes to delegate completion notifications from the container. */ @Override public final void onComplete() { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "No more items to write"); } this.state.get().onComplete(this); }
private boolean changeState(State oldState, State newState) { boolean result = this.state.compareAndSet(oldState, newState); if (result && rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + oldState + " -> " + newState); } return result; }
private void writeIfPossible() { boolean result = isWritePossible(); if (!result && rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "isWritePossible: false"); } if (result) { onWritePossible(); } }
/** * Completion signal from the upstream, write Publisher. This is also used * by sub-classes to delegate completion notifications from the container. */ @Override public final void onComplete() { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "No more items to write"); } this.state.get().onComplete(this); }
/** * Invoked when writing is possible, either in the same thread after a check * via {@link #isWritePossible()}, or as a callback from the underlying * container. */ public final void onWritePossible() { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "onWritePossible"); } this.state.get().onWritePossible(this); }
@Override public final void onNext(T data) { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "Item to write"); } this.state.get().onNext(this, data); }
/** * Invoked during an error or completion callback from the underlying * container to cancel the upstream subscription. */ public void cancel() { rsWriteLogger.trace(getLogPrefix() + "Cancellation"); if (this.subscription != null) { this.subscription.cancel(); } }
/** * Error signal from the upstream, write Publisher. This is also used by * sub-classes to delegate error notifications from the container. */ @Override public final void onError(Throwable ex) { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "Write source error: " + ex); } this.state.get().onError(this, ex); }
private void writeIfPossible() { boolean result = isWritePossible(); if (!result && rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "isWritePossible: false"); } if (result) { onWritePossible(); } }
private boolean changeState(State oldState, State newState) { boolean result = this.state.compareAndSet(oldState, newState); if (result && rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + oldState + " -> " + newState); } return result; }
/** * Error signal from the upstream, write Publisher. This is also used by * sub-classes to delegate error notifications from the container. */ @Override public final void onError(Throwable ex) { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "Write source error: " + ex); } this.state.get().onError(this, ex); }
@Override public final void onNext(T data) { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "Item to write"); } this.state.get().onNext(this, data); }
/** * Completion signal from the upstream, write Publisher. This is also used * by sub-classes to delegate completion notifications from the container. */ @Override public final void onComplete() { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "No more items to write"); } this.state.get().onComplete(this); }
/** * Invoked when writing is possible, either in the same thread after a check * via {@link #isWritePossible()}, or as a callback from the underlying * container. */ public final void onWritePossible() { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "onWritePossible"); } this.state.get().onWritePossible(this); }
private void writeIfPossible() { boolean result = isWritePossible(); if (!result && rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "isWritePossible: false"); } if (result) { onWritePossible(); } }