Exemplo n.º 1
0
  @Override
  public synchronized void delete() {
    closed.set(true);

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

    // try to delete the file
    file.delete();
  }
Exemplo n.º 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);
  }