@Test void testPersist() { var prevCacheSize = repository.size(); repository.persist(new CopybookModel("NEW_STO", "URI", "DUMMY CONTENT")); assertEquals(repository.size(), prevCacheSize + 1); }
@Override public synchronized void persist(@NonNull CopybookModel copybookModel) { cache.put(copybookModel.getName(), copybookModel); }
CopybookRepositoryLRU implements CopybookRepository { @Override public synchronized void persist(@NonNull CopybookModel copybookModel) { cache.put(copybookModel.getName(), copybookModel); } }
CopybookRepositoryLRU implements CopybookRepository { @Override public synchronized void persist(@NonNull CopybookModel copybookModel) { cache.put(copybookModel.getName(), copybookModel); } @Inject  CopybookRepositoryLRU(
      @Named("CACHE-MAX-SIZE") int cacheSize,
      @Named("CACHE-DURATION") int duration,
      @Named("CACHE-TIME-UNIT") String timeUnitName);   CopybookRepositoryLRU(int cacheSize, int duration, String timeUnitName, Ticker ticker); }
CopybookRepositoryLRU implements CopybookRepository { @Override public synchronized void persist(@NonNull CopybookModel copybookModel) { cache.put(copybookModel.getName(), copybookModel); } @Inject  CopybookRepositoryLRU(
      @Named("CACHE-MAX-SIZE") int cacheSize,
      @Named("CACHE-DURATION") int duration,
      @Named("CACHE-TIME-UNIT") String timeUnitName);   CopybookRepositoryLRU(int cacheSize, int duration, String timeUnitName, Ticker ticker); @Override Optional<CopybookModel> getCopybookStorableFromCache(@NonNull String name); @Override synchronized void persist(@NonNull CopybookModel copybookModel); @Override String logContent(); @Override int size(); @Override boolean isStored(@NonNull String name); @Override void invalidateCache(); }
CopybookRepositoryLRU implements CopybookRepository { @Override public synchronized void persist(@NonNull CopybookModel copybookModel) { cache.put(copybookModel.getName(), copybookModel); } @Inject  CopybookRepositoryLRU(
      @Named("CACHE-MAX-SIZE") int cacheSize,
      @Named("CACHE-DURATION") int duration,
      @Named("CACHE-TIME-UNIT") String timeUnitName);   CopybookRepositoryLRU(int cacheSize, int duration, String timeUnitName, Ticker ticker); @Override Optional<CopybookModel> getCopybookStorableFromCache(@NonNull String name); @Override synchronized void persist(@NonNull CopybookModel copybookModel); @Override String logContent(); @Override int size(); @Override boolean isStored(@NonNull String name); @Override void invalidateCache();  }