FileLock lock = channel.lock();
if (LOG.isTraceEnabled()) {
LOG.trace("Acquired exclusive read lock: " + lock + " to file: " + file);
}
// just release it now we dont want to hold it during the rest of the processing
lock.release();
} finally {
// must close channel
ObjectHelper.close(channel, "FileConsumer during acquiring of exclusive read lock", LOG);
}
}