コード例 #1
0
  public void reset() {
    synchronized (lock) {
      if (current_context != null) {

        current_context.destroy(new Exception("Reset"));
      }

      save_to.delete();
    }
  }
コード例 #2
0
  public DiskManagerChannel createChannel() throws DownloadException {

    try {
      synchronized (lock) {
        if (current_context == null) {

          current_context = new context();
        }

        return (current_context.createChannel());
      }
    } catch (Throwable e) {

      throw (new DownloadException("Channel creation failed", e));
    }
  }