/** * @return Current snapshot of this session info. */ public SessionInfo getSessionInfo() { List<StreamSummary> receivingSummaries = Lists.newArrayList(); for (StreamTask receiver : receivers.values()) receivingSummaries.add(receiver.getSummary()); List<StreamSummary> transferSummaries = Lists.newArrayList(); for (StreamTask transfer : transfers.values()) transferSummaries.add(transfer.getSummary()); return new SessionInfo(peer, index, connecting, receivingSummaries, transferSummaries, state); }
/** * @return StreamSummary that describes this task */ public StreamSummary getSummary() { return new StreamSummary(cfId, getTotalNumberOfFiles(), getTotalSize()); } }
private synchronized void closeSession(State finalState) { if (isAborted.compareAndSet(false, true)) { state(finalState); if (finalState == State.FAILED) { for (StreamTask task : Iterables.concat(receivers.values(), transfers.values())) task.abort(); } if (keepAliveFuture != null) { logger.debug("[Stream #{}] Finishing keep-alive task.", planId()); keepAliveFuture.cancel(false); keepAliveFuture = null; } // Note that we shouldn't block on this close because this method is called on the handler // incoming thread (so we would deadlock). handler.close(); streamResult.handleSessionComplete(this); } }
private synchronized void closeSession(State finalState) { if (isAborted.compareAndSet(false, true)) { state(finalState); if (finalState == State.FAILED) { for (StreamTask task : Iterables.concat(receivers.values(), transfers.values())) task.abort(); } if (keepAliveFuture != null) { logger.debug("[Stream #{}] Finishing keep-alive task.", planId()); keepAliveFuture.cancel(false); keepAliveFuture = null; } // Note that we shouldn't block on this close because this method is called on the handler // incoming thread (so we would deadlock). handler.close(); streamResult.handleSessionComplete(this); } }
/** * @return StreamSummary that describes this task */ public StreamSummary getSummary() { return new StreamSummary(cfId, getTotalNumberOfFiles(), getTotalSize()); } }
/** * @return Current snapshot of this session info. */ public SessionInfo getSessionInfo() { List<StreamSummary> receivingSummaries = Lists.newArrayList(); for (StreamTask receiver : receivers.values()) receivingSummaries.add(receiver.getSummary()); List<StreamSummary> transferSummaries = Lists.newArrayList(); for (StreamTask transfer : transfers.values()) transferSummaries.add(transfer.getSummary()); return new SessionInfo(peer, index, connecting, receivingSummaries, transferSummaries, state); }
private synchronized void closeSession(State finalState) { if (isAborted.compareAndSet(false, true)) { state(finalState); if (finalState == State.FAILED) { for (StreamTask task : Iterables.concat(receivers.values(), transfers.values())) task.abort(); } // Note that we shouldn't block on this close because this method is called on the handler // incoming thread (so we would deadlock). handler.close(); streamResult.handleSessionComplete(this); } }
/** * @return StreamSummary that describes this task */ public StreamSummary getSummary() { return new StreamSummary(cfId, getTotalNumberOfFiles(), getTotalSize()); } }
/** * @return Current snapshot of this session info. */ public SessionInfo getSessionInfo() { List<StreamSummary> receivingSummaries = Lists.newArrayList(); for (StreamTask receiver : receivers.values()) receivingSummaries.add(receiver.getSummary()); List<StreamSummary> transferSummaries = Lists.newArrayList(); for (StreamTask transfer : transfers.values()) transferSummaries.add(transfer.getSummary()); return new SessionInfo(peer, index, connecting, receivingSummaries, transferSummaries, state); }
private synchronized void closeSession(State finalState) { if (isAborted.compareAndSet(false, true)) { state(finalState); if (finalState == State.FAILED) { for (StreamTask task : Iterables.concat(receivers.values(), transfers.values())) task.abort(); } if (keepAliveFuture != null) { logger.debug("[Stream #{}] Finishing keep-alive task.", planId()); keepAliveFuture.cancel(false); keepAliveFuture = null; } // Note that we shouldn't block on this close because this method is called on the handler // incoming thread (so we would deadlock). handler.close(); streamResult.handleSessionComplete(this); } }
/** * @return StreamSummary that describes this task */ public StreamSummary getSummary() { return new StreamSummary(cfId, getTotalNumberOfFiles(), getTotalSize()); } }
/** * @return Current snapshot of this session info. */ public SessionInfo getSessionInfo() { List<StreamSummary> receivingSummaries = Lists.newArrayList(); for (StreamTask receiver : receivers.values()) receivingSummaries.add(receiver.getSummary()); List<StreamSummary> transferSummaries = Lists.newArrayList(); for (StreamTask transfer : transfers.values()) transferSummaries.add(transfer.getSummary()); return new SessionInfo(peer, index, connecting, receivingSummaries, transferSummaries, state); }