test_class.declarator: LOG = LoggerFactory.getLogger(UploadStagingCacheTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(UploadStagingCacheTest.class);
test_class.type: Logger
test_class.var_name: LOG
test_class.declarator: ID_PREFIX = "12345"
test_class.modifier: private static final
test_class.original_string: private static final String ID_PREFIX = "12345";
test_class.type: String
test_class.var_name: ID_PREFIX
test_class.declarator: folder = new TemporaryFolder(new File("target"))
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public TemporaryFolder folder = new TemporaryFolder(new File("target"));
test_class.type: TemporaryFolder
test_class.var_name: folder
test_class.declarator: expectedEx = ExpectedException.none()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public ExpectedException expectedEx = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: expectedEx
test_class.declarator: cache
test_class.modifier: private
test_class.original_string: private CompositeDataStoreCache cache;
test_class.type: CompositeDataStoreCache
test_class.var_name: cache
test_class.declarator: closer = Closer.create()
test_class.modifier: private final
test_class.original_string: private final Closer closer = Closer.create();
test_class.type: Closer
test_class.var_name: closer
test_class.declarator: root
test_class.modifier: private
test_class.original_string: private File root;
test_class.type: File
test_class.var_name: root
test_class.declarator: uploader
test_class.modifier: private
test_class.original_string: private TestStagingUploader uploader;
test_class.type: TestStagingUploader
test_class.var_name: uploader
test_class.declarator: loader
test_class.modifier: private
test_class.original_string: private TestCacheLoader loader;
test_class.type: TestCacheLoader
test_class.var_name: loader
test_class.declarator: taskLatch
test_class.modifier: private
test_class.original_string: private CountDownLatch taskLatch;
test_class.type: CountDownLatch
test_class.var_name: taskLatch
test_class.declarator: callbackLatch
test_class.modifier: private
test_class.original_string: private CountDownLatch callbackLatch;
test_class.type: CountDownLatch
test_class.var_name: callbackLatch
test_class.declarator: afterExecuteLatch
test_class.modifier: private
test_class.original_string: private CountDownLatch afterExecuteLatch;
test_class.type: CountDownLatch
test_class.var_name: afterExecuteLatch
test_class.declarator: executor
test_class.modifier: private
test_class.original_string: private TestExecutor executor;
test_class.type: TestExecutor
test_class.var_name: executor
test_class.declarator: statsProvider
test_class.modifier: private
test_class.original_string: private StatisticsProvider statsProvider;
test_class.type: StatisticsProvider
test_class.var_name: statsProvider
test_class.declarator: scheduledExecutor
test_class.modifier: private
test_class.original_string: private ScheduledExecutorService scheduledExecutor;
test_class.type: ScheduledExecutorService
test_class.var_name: scheduledExecutor
test_class.declarator: fileCacheExecutor
test_class.modifier: private
test_class.original_string: private ExecutorService fileCacheExecutor;
test_class.type: ExecutorService
test_class.var_name: fileCacheExecutor
test_class.file: oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/CompositeDataStoreCacheTest.java
test_class.identifier: CompositeDataStoreCacheTest
test_class.superclass: extends AbstractDataStoreCacheTest
test_case.body: @Test
      public void invalidate() throws Exception {
          LOG.info("Starting invalidate");
  
          File f = copyToFile(randomStream(0, 4 * 1024), folder.newFile());
          loader.write(ID_PREFIX + 0, f);
  
          // present after loading
          File cached = cache.get(ID_PREFIX + 0);
          assertNotNull(cached);
          assertTrue(Files.equal(f, cached));
  
          cache.invalidate(ID_PREFIX + 0);
  
          // Not present now
          cached = cache.getIfPresent(ID_PREFIX + 0);
          assertNull(cached);
  
          assertCacheStats(cache.getStagingCacheStats(), 0, 0, 0, 0);
          assertEquals(2, cache.getStagingCacheStats().getLoadCount());
          assertEquals(0, cache.getStagingCacheStats().getLoadSuccessCount());
  
          assertCacheStats(cache.getCacheStats(), 0, 0, 0, 2);
          assertEquals(1, cache.getCacheStats().getLoadCount());
          assertEquals(1, cache.getCacheStats().getLoadSuccessCount());
  
          /** Check eviction count */
          assertEquals(0, cache.getCacheStats().getEvictionCount());
  
          LOG.info("Finished invalidate");
      }
test_case.class_method_signature: CompositeDataStoreCacheTest.invalidate()
test_case.full_signature: @Test public void invalidate()
test_case.identifier: invalidate
test_case.invocations: info copyToFile randomStream newFile write get assertNotNull assertTrue equal invalidate getIfPresent assertNull assertCacheStats getStagingCacheStats assertEquals getLoadCount getStagingCacheStats assertEquals getLoadSuccessCount getStagingCacheStats assertCacheStats getCacheStats assertEquals getLoadCount getCacheStats assertEquals getLoadSuccessCount getCacheStats assertEquals getEvictionCount getCacheStats info
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void invalidate()
focal_class.declarator: LOG = LoggerFactory.getLogger(CompositeDataStoreCache.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(CompositeDataStoreCache.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: downloadCache
focal_class.modifier: private final
focal_class.original_string: private final FileCache downloadCache;
focal_class.type: FileCache
focal_class.var_name: downloadCache
focal_class.declarator: stagingCache
focal_class.modifier: private final
focal_class.original_string: private final UploadStagingCache stagingCache;
focal_class.type: UploadStagingCache
focal_class.var_name: stagingCache
focal_class.declarator: directory
focal_class.modifier: private final
focal_class.original_string: private final File directory;
focal_class.type: File
focal_class.var_name: directory
focal_class.file: oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/CompositeDataStoreCache.java
focal_class.identifier: CompositeDataStoreCache
focal_class.interfaces: implements Closeable
focal_class.class_method_signature: CompositeDataStoreCache.CompositeDataStoreCache(String path, File home, long size, int uploadSplitPercentage,
          int uploadThreads, CacheLoader<String, InputStream> loader, final StagingUploader uploader,
          StatisticsProvider statsProvider, ListeningExecutorService listeningExecutor,
          ScheduledExecutorService scheduledExecutor /* purge scheduled executor */,
          ExecutorService executor /* File cache executor */,
          int purgeInterval /* async purge interval secs */,
          int stagingRetryInterval /* async retry interval secs */)
focal_class.full_signature: public  CompositeDataStoreCache(String path, File home, long size, int uploadSplitPercentage,
          int uploadThreads, CacheLoader<String, InputStream> loader, final StagingUploader uploader,
          StatisticsProvider statsProvider, ListeningExecutorService listeningExecutor,
          ScheduledExecutorService scheduledExecutor /* purge scheduled executor */,
          ExecutorService executor /* File cache executor */,
          int purgeInterval /* async purge interval secs */,
          int stagingRetryInterval /* async retry interval secs */)
focal_class.identifier: CompositeDataStoreCache
focal_class.modifiers: public
focal_class.parameters: (String path, File home, long size, int uploadSplitPercentage,
          int uploadThreads, CacheLoader<String, InputStream> loader, final StagingUploader uploader,
          StatisticsProvider statsProvider, ListeningExecutorService listeningExecutor,
          ScheduledExecutorService scheduledExecutor /* purge scheduled executor */,
          ExecutorService executor /* File cache executor */,
          int purgeInterval /* async purge interval secs */,
          int stagingRetryInterval /* async retry interval secs */)
focal_class.signature:  CompositeDataStoreCache(String path, File home, long size, int uploadSplitPercentage,
          int uploadThreads, CacheLoader<String, InputStream> loader, final StagingUploader uploader,
          StatisticsProvider statsProvider, ListeningExecutorService listeningExecutor,
          ScheduledExecutorService scheduledExecutor /* purge scheduled executor */,
          ExecutorService executor /* File cache executor */,
          int purgeInterval /* async purge interval secs */,
          int stagingRetryInterval /* async retry interval secs */)
focal_class.class_method_signature: CompositeDataStoreCache.getIfPresent(String key)
focal_class.full_signature: @Nullable public File getIfPresent(String key)
focal_class.identifier: getIfPresent
focal_class.modifiers: @Nullable public
focal_class.parameters: (String key)
focal_class.return: File
focal_class.signature: File getIfPresent(String key)
focal_class.class_method_signature: CompositeDataStoreCache.getIfPresent(Object key)
focal_class.full_signature: @Nullable @Override public File getIfPresent(Object key)
focal_class.identifier: getIfPresent
focal_class.modifiers: @Nullable @Override public
focal_class.parameters: (Object key)
focal_class.return: File
focal_class.signature: File getIfPresent(Object key)
focal_class.class_method_signature: CompositeDataStoreCache.get(String key)
focal_class.full_signature: public File get(String key)
focal_class.identifier: get
focal_class.modifiers: public
focal_class.parameters: (String key)
focal_class.return: File
focal_class.signature: File get(String key)
focal_class.class_method_signature: CompositeDataStoreCache.invalidate(Object key)
focal_class.full_signature: @Override public void invalidate(Object key)
focal_class.identifier: invalidate
focal_class.modifiers: @Override public
focal_class.parameters: (Object key)
focal_class.return: void
focal_class.signature: void invalidate(Object key)
focal_class.class_method_signature: CompositeDataStoreCache.stage(String key, File file)
focal_class.full_signature: public boolean stage(String key, File file)
focal_class.identifier: stage
focal_class.modifiers: public
focal_class.parameters: (String key, File file)
focal_class.return: boolean
focal_class.signature: boolean stage(String key, File file)
focal_class.class_method_signature: CompositeDataStoreCache.getStagingCacheStats()
focal_class.full_signature: public DataStoreCacheStatsMBean getStagingCacheStats()
focal_class.identifier: getStagingCacheStats
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: DataStoreCacheStatsMBean
focal_class.signature: DataStoreCacheStatsMBean getStagingCacheStats()
focal_class.class_method_signature: CompositeDataStoreCache.getCacheStats()
focal_class.full_signature: public DataStoreCacheStatsMBean getCacheStats()
focal_class.identifier: getCacheStats
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: DataStoreCacheStatsMBean
focal_class.signature: DataStoreCacheStatsMBean getCacheStats()
focal_class.class_method_signature: CompositeDataStoreCache.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: CompositeDataStoreCache.getStagingCache()
focal_class.full_signature:  UploadStagingCache getStagingCache()
focal_class.identifier: getStagingCache
focal_class.parameters: ()
focal_class.return: UploadStagingCache
focal_class.signature: UploadStagingCache getStagingCache()
focal_class.class_method_signature: CompositeDataStoreCache.getDownloadCache()
focal_class.full_signature:  FileCache getDownloadCache()
focal_class.identifier: getDownloadCache
focal_class.parameters: ()
focal_class.return: FileCache
focal_class.signature: FileCache getDownloadCache()
focal_class.superclass: extends AbstractCache<String, File>
focal_method.body: @Override
      public void invalidate(Object key) {
          stagingCache.invalidate((String) key);
          downloadCache.invalidate(key);
      }
focal_method.class_method_signature: CompositeDataStoreCache.invalidate(Object key)
focal_method.full_signature: @Override public void invalidate(Object key)
focal_method.identifier: invalidate
focal_method.invocations: invalidate invalidate
focal_method.modifiers: @Override public
focal_method.parameters: (Object key)
focal_method.return: void
focal_method.signature: void invalidate(Object key)