//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @SuppressWarnings("unchecked") private org.neo4j.util.concurrent.AsyncApply sendDownstream(long ticket, Object batch, org.neo4j.util.concurrent.AsyncApply downstreamAsync) private AsyncApply SendDownstream(long ticket, object batch, AsyncApply downstreamAsync) { if (Guarantees(Step_Fields.ORDER_SEND_DOWNSTREAM)) { AsyncApply async = DownstreamWorkSync.applyAsync(new SendDownstream(ticket, batch, DownstreamIdleTime)); if (downstreamAsync != null) { try { downstreamAsync.Await(); async.Await(); return(null); } catch (ExecutionException e) { IssuePanic(e.InnerException); } } else { return(async); } } else { DownstreamIdleTime.add(DownstreamConflict.receive(ticket, batch)); DoneBatches.incrementAndGet(); } return(null); }
protected internal override void Done() { LastCallForEmittingOutstandingBatches(new Sender(this)); if (DownstreamWorkSync != null) { try { DownstreamWorkSync.apply(new SendDownstream(-1, null, DownstreamIdleTime)); } catch (ExecutionException e) { IssuePanic(e.InnerException); } } base.Done(); }