Esempio n. 1
0
 public void stop() throws Exception {
   if (closed()) return;
   if (later != null && later.closed()) { // Our later finished
     meter.add(later.result().stripe.size); // If an exception closed later, throw it
     later = null; // Discard the closed later, now in() and out() will work
   }
   if (meter.isDone()) close(); // All done
 }
Esempio n. 2
0
 public boolean isEmpty() {
   return later == null
       && // No later using our bins
       in.isEmpty()
       && // No data
       meter.isEmpty(); // No responsibility to do more
 }
Esempio n. 3
0
 public void start() {
   if (closed()) return;
   if (!meter.isDone() && later == null && in.hasData())
     later = new UploadTask(update, socket, meter.remain(), in);
 }