コード例 #1
0
ファイル: UploadValve.java プロジェクト: zootella/bridge
 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
 }
コード例 #2
0
ファイル: UploadValve.java プロジェクト: zootella/bridge
 /** Close this Valve so it gives up all resources and won't start again. */
 public void close() {
   if (already()) return;
   if (later != null) {
     later.close();
     later = null; // Discard the closed later so in() and out() work
   }
 }