/** * Gets the last filename. * * @param serviceName the service name * @param resourceDir the resource directory * @param targetPath the target path * @return the last filename * @throws Exception the exception */ public static String getLastFilename(ResourceStorageDao resourceStorageDao, String serviceName, ResourcePath path, String targetPath) throws Exception { String filename = null; try { filename = resourceStorageDao.getStringAttribute(path, getCacheId(serviceName, targetPath)); } catch (Throwable e) { LOG.info("getLastFilename: creating a new filename tracker on {}", path); } return filename; }
/** * Gets the last filename. * * @param serviceName the service name * @param resourceDir the resource directory * @param targetPath the target path * @return the last filename * @throws Exception the exception */ public static String getLastFilename(ResourceStorageDao resourceStorageDao, String serviceName, ResourcePath path, String targetPath) throws Exception { String filename = null; try { filename = resourceStorageDao.getStringAttribute(path, getCacheId(serviceName, targetPath)); } catch (Throwable e) { LOG.info("getLastFilename: creating a new filename tracker on {}", path); } return filename; }
/** * Gets the last timestamp. * * @param resource the TCA resource * @return the last timestamp */ private long getLastTimestamp(CollectionResource resource) { long timestamp = 0; ResourcePath path = ResourceTypeUtils.getResourcePathWithRepository(m_repository, resource.getPath()); try { LOG.debug("Retrieving timestamp from path {}", path); String ts = m_resourceStorageDao.getStringAttribute(path, LAST_TIMESTAMP); if (ts != null) { timestamp = Long.parseLong(ts); } } catch (Exception e) { LOG.error("Failed to retrieve timestamp from path {}", path, e); } return timestamp; }
retval = m_resourceStorageDao.getStringAttribute(path, ds); if (retval != null) { return retval;