if (!dataFile.canRead()) {
logger.error("Data file is not readable: {}", dataFile);
throw new StoreException("Can't read data file: " + dataFile);
}
// try to create a lock for later writing
dirLock = locker.tryLock();
if (dirLock == null) {
logger.warn("Failed to lock directory: {}", dataDir);
}
// Don't try to read empty files: this will result in an
// IOException, and the file doesn't contain any data anyway.