test_class.declarator: temporaryFolder = new TemporaryFolder(new File("target"))
test_class.modifier: @Rule
      public final
test_class.original_string: @Rule
      public final TemporaryFolder temporaryFolder = new TemporaryFolder(new File("target"));
test_class.type: TemporaryFolder
test_class.var_name: temporaryFolder
test_class.declarator: context = new OsgiContext()
test_class.modifier: @Rule
      public final
test_class.original_string: @Rule
      public final OsgiContext context = new OsgiContext();
test_class.type: OsgiContext
test_class.var_name: context
test_class.declarator: builderProvider = new DocumentMKBuilderProvider()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public DocumentMKBuilderProvider builderProvider = new DocumentMKBuilderProvider();
test_class.type: DocumentMKBuilderProvider
test_class.var_name: builderProvider
test_class.declarator: wb
test_class.modifier: private
test_class.original_string: private Whiteboard wb;
test_class.type: Whiteboard
test_class.var_name: wb
test_class.declarator: nodeStore
test_class.modifier: private
test_class.original_string: private NodeStore nodeStore;
test_class.type: NodeStore
test_class.var_name: nodeStore
test_class.declarator: indexPaths = Lists.newArrayList()
test_class.modifier: private
test_class.original_string: private List<String> indexPaths = Lists.newArrayList();
test_class.type: List<String>
test_class.var_name: indexPaths
test_class.declarator: clock = new Clock.Virtual()
test_class.modifier: private final
test_class.original_string: private final Clock clock = new Clock.Virtual();
test_class.type: Clock
test_class.var_name: clock
test_class.file: oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/ActiveDeletedBlobCollectorMBeanImplTest.java
test_class.identifier: ActiveDeletedBlobCollectorMBeanImplTest
test_case.body: @Test
      public void orderOfFlaggingWaitForIndexersAndUpdateIndexFiles() {
          final AtomicBoolean isPaused = new AtomicBoolean();
          final AtomicBoolean hadWaitedForIndex = new AtomicBoolean();
  
          IndexPathService indexPathService = mock(IndexPathService.class);
          when(indexPathService.getIndexPaths()).then(mockObj -> {
              assertTrue("Must wait for indexers before going to update index files", hadWaitedForIndex.get());
              return indexPaths;
          });
          AsyncIndexInfoService asyncIndexInfoService = MockRegistrar.getAsyncIndexInfoService(newArrayList(
                  new IndexMBeanInfoSupplier("foo-async", () -> {
                      assertTrue("Must pause before waiting for indexers", isPaused.get());
                      hadWaitedForIndex.set(true);
                      return STATUS_DONE;
                  }, () -> 2L)
          ));
  
          ActiveDeletedBlobCollectorMBeanImpl bean =
                  new ActiveDeletedBlobCollectorMBeanImpl(new PauseNotifyingActiveDeletedBlobCollector(() -> {
                      isPaused.set(true);
                      return null;
                  }), wb, nodeStore,
                          indexPathService, asyncIndexInfoService,
                          new MemoryBlobStore(), sameThreadExecutor());
          bean.clock = clock;
  
          bean.flagActiveDeletionUnsafeForCurrentState();
      }
test_case.class_method_signature: ActiveDeletedBlobCollectorMBeanImplTest.orderOfFlaggingWaitForIndexersAndUpdateIndexFiles()
test_case.full_signature: @Test public void orderOfFlaggingWaitForIndexersAndUpdateIndexFiles()
test_case.identifier: orderOfFlaggingWaitForIndexersAndUpdateIndexFiles
test_case.invocations: mock then when getIndexPaths assertTrue get getAsyncIndexInfoService newArrayList assertTrue get set set sameThreadExecutor flagActiveDeletionUnsafeForCurrentState
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void orderOfFlaggingWaitForIndexersAndUpdateIndexFiles()
focal_class.declarator: LOG = LoggerFactory.getLogger(ActiveDeletedBlobCollectorMBeanImpl.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(ActiveDeletedBlobCollectorMBeanImpl.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: OP_NAME = "Active lucene index blobs collection"
focal_class.modifier: private static final
focal_class.original_string: private static final String OP_NAME = "Active lucene index blobs collection";
focal_class.type: String
focal_class.var_name: OP_NAME
focal_class.declarator: MIN_BLOB_AGE_TO_ACTIVELY_DELETE = Long.getLong("oak.active.deletion.minAge",
              TimeUnit.HOURS.toSeconds(24))
focal_class.modifier: private final
focal_class.original_string: private final long MIN_BLOB_AGE_TO_ACTIVELY_DELETE = Long.getLong("oak.active.deletion.minAge",
              TimeUnit.HOURS.toSeconds(24));
focal_class.type: long
focal_class.var_name: MIN_BLOB_AGE_TO_ACTIVELY_DELETE
focal_class.declarator: ACTIVE_DELETION_DISABLED = Boolean.getBoolean("oak.active.deletion.disabled")
focal_class.modifier: private final
focal_class.original_string: private final boolean ACTIVE_DELETION_DISABLED = Boolean.getBoolean("oak.active.deletion.disabled");
focal_class.type: boolean
focal_class.var_name: ACTIVE_DELETION_DISABLED
focal_class.declarator: clock = Clock.SIMPLE
focal_class.original_string: Clock clock = Clock.SIMPLE;
focal_class.type: Clock
focal_class.var_name: clock
focal_class.declarator: activeDeletedBlobCollector
focal_class.modifier: @NotNull
      private final
focal_class.original_string: @NotNull
      private final ActiveDeletedBlobCollector activeDeletedBlobCollector;
focal_class.type: ActiveDeletedBlobCollector
focal_class.var_name: activeDeletedBlobCollector
focal_class.declarator: whiteboard
focal_class.modifier: @NotNull
      private
focal_class.original_string: @NotNull
      private Whiteboard whiteboard;
focal_class.type: Whiteboard
focal_class.var_name: whiteboard
focal_class.declarator: blobStore
focal_class.modifier: @NotNull
      private final
focal_class.original_string: @NotNull
      private final GarbageCollectableBlobStore blobStore;
focal_class.type: GarbageCollectableBlobStore
focal_class.var_name: blobStore
focal_class.declarator: executor
focal_class.modifier: @NotNull
      private final
focal_class.original_string: @NotNull
      private final Executor executor;
focal_class.type: Executor
focal_class.var_name: executor
focal_class.declarator: store
focal_class.modifier: private final
focal_class.original_string: private final NodeStore store;
focal_class.type: NodeStore
focal_class.var_name: store
focal_class.declarator: indexPathService
focal_class.modifier: private final
focal_class.original_string: private final IndexPathService indexPathService;
focal_class.type: IndexPathService
focal_class.var_name: indexPathService
focal_class.declarator: asyncIndexInfoService
focal_class.modifier: private final
focal_class.original_string: private final AsyncIndexInfoService asyncIndexInfoService;
focal_class.type: AsyncIndexInfoService
focal_class.var_name: asyncIndexInfoService
focal_class.declarator: gcOp = done(OP_NAME, null)
focal_class.modifier: private
focal_class.original_string: private ManagementOperation<Void> gcOp = done(OP_NAME, null);
focal_class.type: ManagementOperation<Void>
focal_class.var_name: gcOp
focal_class.file: oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/ActiveDeletedBlobCollectorMBeanImpl.java
focal_class.identifier: ActiveDeletedBlobCollectorMBeanImpl
focal_class.interfaces: implements ActiveDeletedBlobCollectorMBean
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.ActiveDeletedBlobCollectorMBeanImpl(
              @NotNull ActiveDeletedBlobCollector activeDeletedBlobCollector,
              @NotNull Whiteboard whiteboard,
              @NotNull NodeStore store,
              @NotNull IndexPathService indexPathService,
              @NotNull AsyncIndexInfoService asyncIndexInfoService,
              @NotNull GarbageCollectableBlobStore blobStore,
              @NotNull Executor executor)
focal_class.full_signature: public  ActiveDeletedBlobCollectorMBeanImpl(
              @NotNull ActiveDeletedBlobCollector activeDeletedBlobCollector,
              @NotNull Whiteboard whiteboard,
              @NotNull NodeStore store,
              @NotNull IndexPathService indexPathService,
              @NotNull AsyncIndexInfoService asyncIndexInfoService,
              @NotNull GarbageCollectableBlobStore blobStore,
              @NotNull Executor executor)
focal_class.identifier: ActiveDeletedBlobCollectorMBeanImpl
focal_class.modifiers: public
focal_class.parameters: (
              @NotNull ActiveDeletedBlobCollector activeDeletedBlobCollector,
              @NotNull Whiteboard whiteboard,
              @NotNull NodeStore store,
              @NotNull IndexPathService indexPathService,
              @NotNull AsyncIndexInfoService asyncIndexInfoService,
              @NotNull GarbageCollectableBlobStore blobStore,
              @NotNull Executor executor)
focal_class.signature:  ActiveDeletedBlobCollectorMBeanImpl(
              @NotNull ActiveDeletedBlobCollector activeDeletedBlobCollector,
              @NotNull Whiteboard whiteboard,
              @NotNull NodeStore store,
              @NotNull IndexPathService indexPathService,
              @NotNull AsyncIndexInfoService asyncIndexInfoService,
              @NotNull GarbageCollectableBlobStore blobStore,
              @NotNull Executor executor)
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.isDisabled()
focal_class.full_signature: @Override public boolean isDisabled()
focal_class.identifier: isDisabled
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isDisabled()
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.startActiveCollection()
focal_class.full_signature: @NotNull @Override public CompositeData startActiveCollection()
focal_class.identifier: startActiveCollection
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: CompositeData
focal_class.signature: CompositeData startActiveCollection()
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.cancelActiveCollection()
focal_class.full_signature: @NotNull @Override public CompositeData cancelActiveCollection()
focal_class.identifier: cancelActiveCollection
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: CompositeData
focal_class.signature: CompositeData cancelActiveCollection()
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.getActiveCollectionStatus()
focal_class.full_signature: @NotNull @Override public CompositeData getActiveCollectionStatus()
focal_class.identifier: getActiveCollectionStatus
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: CompositeData
focal_class.signature: CompositeData getActiveCollectionStatus()
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.isActiveDeletionUnsafe()
focal_class.full_signature: @Override public boolean isActiveDeletionUnsafe()
focal_class.identifier: isActiveDeletionUnsafe
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isActiveDeletionUnsafe()
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.flagActiveDeletionUnsafeForCurrentState()
focal_class.full_signature: @Override public void flagActiveDeletionUnsafeForCurrentState()
focal_class.identifier: flagActiveDeletionUnsafeForCurrentState
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void flagActiveDeletionUnsafeForCurrentState()
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.flagActiveDeletionSafe()
focal_class.full_signature: @Override public void flagActiveDeletionSafe()
focal_class.identifier: flagActiveDeletionSafe
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void flagActiveDeletionSafe()
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.waitForRunningIndexCycles()
focal_class.full_signature: private boolean waitForRunningIndexCycles()
focal_class.identifier: waitForRunningIndexCycles
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean waitForRunningIndexCycles()
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.markCurrentIndexFilesUnsafeForActiveDeletion()
focal_class.full_signature: private void markCurrentIndexFilesUnsafeForActiveDeletion()
focal_class.identifier: markCurrentIndexFilesUnsafeForActiveDeletion
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void markCurrentIndexFilesUnsafeForActiveDeletion()
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.markCurrentIndexFilesUnsafeForActiveDeletionFor(NodeBuilder rootBuilder, String indexPath)
focal_class.full_signature: private void markCurrentIndexFilesUnsafeForActiveDeletionFor(NodeBuilder rootBuilder, String indexPath)
focal_class.identifier: markCurrentIndexFilesUnsafeForActiveDeletionFor
focal_class.modifiers: private
focal_class.parameters: (NodeBuilder rootBuilder, String indexPath)
focal_class.return: void
focal_class.signature: void markCurrentIndexFilesUnsafeForActiveDeletionFor(NodeBuilder rootBuilder, String indexPath)
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.getBuilderForPath(NodeBuilder rootBuilder, String path)
focal_class.full_signature: private static NodeBuilder getBuilderForPath(NodeBuilder rootBuilder, String path)
focal_class.identifier: getBuilderForPath
focal_class.modifiers: private static
focal_class.parameters: (NodeBuilder rootBuilder, String path)
focal_class.return: NodeBuilder
focal_class.signature: NodeBuilder getBuilderForPath(NodeBuilder rootBuilder, String path)
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.getSafeTimestampForDeletedBlobs()
focal_class.full_signature: private long getSafeTimestampForDeletedBlobs()
focal_class.identifier: getSafeTimestampForDeletedBlobs
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getSafeTimestampForDeletedBlobs()
focal_class.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.getOldestCheckpointCreationTimestamp()
focal_class.full_signature: private long getOldestCheckpointCreationTimestamp()
focal_class.identifier: getOldestCheckpointCreationTimestamp
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getOldestCheckpointCreationTimestamp()
focal_method.body: @Override
      public void flagActiveDeletionUnsafeForCurrentState() {
          activeDeletedBlobCollector.flagActiveDeletionUnsafe(true);
  
          if (!waitForRunningIndexCycles()) {
              LOG.warn("Some indexers were still found running. Resume and quit gracefully");
              activeDeletedBlobCollector.flagActiveDeletionUnsafe(false);
          }
  
          try {
              markCurrentIndexFilesUnsafeForActiveDeletion();
          } catch (CommitFailedException e) {
              LOG.warn("Could not set current index files unsafe for active deletion. Resume and quit gracefully", e);
              activeDeletedBlobCollector.flagActiveDeletionUnsafe(false);
          }
      }
focal_method.class_method_signature: ActiveDeletedBlobCollectorMBeanImpl.flagActiveDeletionUnsafeForCurrentState()
focal_method.full_signature: @Override public void flagActiveDeletionUnsafeForCurrentState()
focal_method.identifier: flagActiveDeletionUnsafeForCurrentState
focal_method.invocations: flagActiveDeletionUnsafe waitForRunningIndexCycles warn flagActiveDeletionUnsafe markCurrentIndexFilesUnsafeForActiveDeletion warn flagActiveDeletionUnsafe
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void flagActiveDeletionUnsafeForCurrentState()