예제 #1
0
  @Override
  public synchronized void delete() {
    closed.set(true);

    // close the channel
    Closeables.closeQuietly(fileChannel);

    // try to delete the file
    file.delete();
  }
예제 #2
0
  @Override
  public synchronized void close() {
    closed.set(true);

    // try to forces the log to disk
    try {
      fileChannel.force(true);
    } catch (IOException ignored) {
    }

    // close the channel
    Closeables.closeQuietly(fileChannel);
  }