Esempio n. 1
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. 2
0
 public void start() {
   if (closed()) return;
   if (!meter.isDone() && later == null && in.hasData())
     later = new UploadTask(update, socket, meter.remain(), in);
 }
Esempio n. 3
0
 /** Make an UploadValve that will upload data into socket. */
 public UploadValve(Update update, Socket socket, Range range) {
   this.update = update;
   this.socket = socket;
   meter = new Meter(range);
   in = Bin.medium();
 }