LogRepositoryCustomImpl implements LogRepositoryCustom { public XLog getProcessLog(Log log, String factoryName) { if (log != null) { long startTime = System.nanoTime(); long elapsedNanos; String key = log.getFilePath(); XLog element = (XLog) cacheRepo.get(key); if (element == null) { LOGGER.info("Cache for [KEY: " + key + "] is null."); try { String name = config.getLogsDir() + "/" + log.getFilePath() + "_" + log.getName() + ".xes.gz"; XFactory factory = getXFactory(factoryName); XLog xlog = importFromFile(factory, name); elapsedNanos = System.nanoTime() - startTime; LOGGER.info("Retrieved XES log " + name + " [" + xlog.hashCode() + "]. Elapsed time: " + elapsedNanos / 1000000 + " ms"); LOGGER.info("Memory Used: " + getMemoryUsage().getUsed() / 1024 / 1024 + " MB "); LOGGER.info("Memory Available: " + (getMemoryUsage().getMax() - getMemoryUsage().getUsed()) / 1024 / 1024 + " " + "MB "); startTime = System.nanoTime(); cacheRepo.put(key, xlog); elapsedNanos = System.nanoTime() - startTime; LOGGER.info("Cache XLog [KEY:" + key + "]. " + "Elapsed time: " + elapsedNanos / 1000000 + " ms."); startTime = System.nanoTime(); cacheRepo.put(key + APMLOG_CACHE_KEY_SUFFIX, apmLogService.findAPMLogForXLog(xlog)); elapsedNanos = System.nanoTime() - startTime; LOGGER.info("Construct and cache APMLog [KEY:" + key + APMLOG_CACHE_KEY_SUFFIX + "]. Elapsed time: " + elapsedNanos / 1000000 + " ms."); LOGGER.info("Memory Used: " + getMemoryUsage().getUsed() / 1024 / 1024 + " MB "); LOGGER.info("Memory Available: " + (getMemoryUsage().getMax() - getMemoryUsage().getUsed()) / 1024 / 1024 + " " + "MB "); LOGGER.info("The number of elements in the memory store = " + cacheRepo.getMemoryStoreSize()); return xlog; } catch (Exception e) { LOGGER.error("Error " + e.getMessage()); } } else { LOGGER.info("Got object [HASH: " + element.hashCode() + " KEY:" + key + "] from cache [" + cacheRepo.getCacheName() + "]"); LOGGER.info("Memory Used: " + getMemoryUsage().getUsed() / 1024 / 1024 + " MB "); return element; } } return null; }  @Override @SuppressWarnings("unchecked") List<Log> findAllLogs(final String conditions); @Override @SuppressWarnings("unchecked") List<Log> findAllLogsByFolder(final Integer folderId, final String userRowGuid, final String conditions); @Override String storeProcessLog(final Integer folderId, final String logName, XLog log, final Integer userID,
                                  final String domain, final String created); void deleteProcessLog(Log log); XLog getProcessLog(Log log, String factoryName); APMLog getAggregatedLog(Log log); String getLayoutByLogId(Integer logId, Integer userId); XLog importFromFile(XFactory factory, String location); void exportToFile(String path, String name, XLog log); XLog importFromInputStream(InputStream inputStream, XParser parser); void exportToInputStream(XLog log, String path, String name, XSerializer serializer);  }
@Test public void getProcessLog() { }