long lastModified; try { lastModified = getLastModified(file); } catch (DataStoreException e) { log.warn("Failed to read modification date; file not deleted", e);
long lastModified; try { lastModified = getLastModified(file); } catch (DataStoreException e) { log.warn("Failed to read modification date; file not deleted", e);
long lastModified; try { lastModified = getLastModified(file); } catch (DataStoreException e) { log.warn("Failed to read modification date; file not deleted", e);
/** * Get a data record for the given identifier. * * @param identifier the identifier * @return the data record or null */ public DataRecord getRecordIfStored(DataIdentifier identifier) throws DataStoreException { File file = getFile(identifier); if (!file.exists()) { return null; } if (minModifiedDate != 0) { // only check when running garbage collection synchronized (this) { if (getLastModified(file) < minModifiedDate) { setLastModified(file, System.currentTimeMillis() + ACCESS_TIME_RESOLUTION); } } } usesIdentifier(identifier); return new FileDataRecord(this, identifier, file); }
/** * Get a data record for the given identifier. * * @param identifier the identifier * @return the data record or null */ public DataRecord getRecordIfStored(DataIdentifier identifier) throws DataStoreException { File file = getFile(identifier); if (!file.exists()) { return null; } if (minModifiedDate != 0) { // only check when running garbage collection synchronized (this) { if (getLastModified(file) < minModifiedDate) { setLastModified(file, System.currentTimeMillis() + ACCESS_TIME_RESOLUTION); } } } usesIdentifier(identifier); return new FileDataRecord(this, identifier, file); }
/** * Get a data record for the given identifier. * * @param identifier the identifier * @return the data record or null */ public DataRecord getRecordIfStored(DataIdentifier identifier) throws DataStoreException { File file = getFile(identifier); if (!file.exists()) { return null; } if (minModifiedDate != 0) { // only check when running garbage collection synchronized (this) { if (getLastModified(file) < minModifiedDate) { setLastModified(file, System.currentTimeMillis() + ACCESS_TIME_RESOLUTION); } } } usesIdentifier(identifier); return new FileDataRecord(this, identifier, file); }
if (getLastModified(file) < now + ACCESS_TIME_RESOLUTION) { setLastModified(file, now + ACCESS_TIME_RESOLUTION);
if (getLastModified(file) < now + ACCESS_TIME_RESOLUTION) { setLastModified(file, now + ACCESS_TIME_RESOLUTION);
if (getLastModified(file) < now + ACCESS_TIME_RESOLUTION) { setLastModified(file, now + ACCESS_TIME_RESOLUTION);