test_class.declarator: fixture
test_class.modifier: private
test_class.original_string: private DocumentStoreFixture fixture;
test_class.type: DocumentStoreFixture
test_class.var_name: fixture
test_class.declarator: store
test_class.modifier: private
test_class.original_string: private DocumentStore store;
test_class.type: DocumentStore
test_class.var_name: store
test_class.declarator: gcSupport
test_class.modifier: private
test_class.original_string: private VersionGCSupport gcSupport;
test_class.type: VersionGCSupport
test_class.var_name: gcSupport
test_class.declarator: ids = Lists.newArrayList()
test_class.modifier: private
test_class.original_string: private List<String> ids = Lists.newArrayList();
test_class.type: List<String>
test_class.var_name: ids
test_class.file: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCSupportTest.java
test_class.identifier: VersionGCSupportTest
test_case.body: @Test
      public void getPossiblyDeletedDocs() {
          long offset = SECONDS.toMillis(42);
          for (int i = 0; i < 5; i++) {
              Revision r = new Revision(offset + SECONDS.toMillis(i), 0, 1);
              String id = Utils.getIdFromPath("/doc-" + i);
              ids.add(id);
              UpdateOp op = new UpdateOp(id, true);
              NodeDocument.setModified(op, r);
              NodeDocument.setDeleted(op, r, true);
              store.create(Collection.NODES, Lists.newArrayList(op));
          }
  
          assertPossiblyDeleted(0, 41, 0);
          assertPossiblyDeleted(0, 42, 0);
          assertPossiblyDeleted(0, 44, 0);
          assertPossiblyDeleted(0, 45, 3);
          assertPossiblyDeleted(0, 46, 3);
          assertPossiblyDeleted(0, 49, 3);
          assertPossiblyDeleted(0, 50, 5);
          assertPossiblyDeleted(0, 51, 5);
          assertPossiblyDeleted(39, 60, 5);
          assertPossiblyDeleted(40, 60, 5);
          assertPossiblyDeleted(41, 60, 5);
          assertPossiblyDeleted(42, 60, 5);
          assertPossiblyDeleted(44, 60, 5);
          assertPossiblyDeleted(45, 60, 2);
          assertPossiblyDeleted(47, 60, 2);
          assertPossiblyDeleted(48, 60, 2);
          assertPossiblyDeleted(49, 60, 2);
          assertPossiblyDeleted(50, 60, 0);
          assertPossiblyDeleted(51, 60, 0);
      }
test_case.class_method_signature: VersionGCSupportTest.getPossiblyDeletedDocs()
test_case.full_signature: @Test public void getPossiblyDeletedDocs()
test_case.identifier: getPossiblyDeletedDocs
test_case.invocations: toMillis toMillis getIdFromPath add setModified setDeleted create newArrayList assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted assertPossiblyDeleted
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getPossiblyDeletedDocs()
focal_class.declarator: LOG = LoggerFactory.getLogger(VersionGCSupport.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(VersionGCSupport.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: store
focal_class.modifier: private final
focal_class.original_string: private final DocumentStore store;
focal_class.type: DocumentStore
focal_class.var_name: store
focal_class.file: oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGCSupport.java
focal_class.identifier: VersionGCSupport
focal_class.class_method_signature: VersionGCSupport.VersionGCSupport(DocumentStore store)
focal_class.full_signature: public  VersionGCSupport(DocumentStore store)
focal_class.identifier: VersionGCSupport
focal_class.modifiers: public
focal_class.parameters: (DocumentStore store)
focal_class.signature:  VersionGCSupport(DocumentStore store)
focal_class.class_method_signature: VersionGCSupport.getPossiblyDeletedDocs(final long fromModified,
                                                           final long toModified)
focal_class.full_signature: public Iterable<NodeDocument> getPossiblyDeletedDocs(final long fromModified,
                                                           final long toModified)
focal_class.identifier: getPossiblyDeletedDocs
focal_class.modifiers: public
focal_class.parameters: (final long fromModified,
                                                           final long toModified)
focal_class.return: Iterable<NodeDocument>
focal_class.signature: Iterable<NodeDocument> getPossiblyDeletedDocs(final long fromModified,
                                                           final long toModified)
focal_class.class_method_signature: VersionGCSupport.getDocumentStore()
focal_class.full_signature: @NotNull public DocumentStore getDocumentStore()
focal_class.identifier: getDocumentStore
focal_class.modifiers: @NotNull public
focal_class.parameters: ()
focal_class.return: DocumentStore
focal_class.signature: DocumentStore getDocumentStore()
focal_class.class_method_signature: VersionGCSupport.deleteSplitDocuments(Set<SplitDocType> gcTypes,
                                RevisionVector sweepRevs,
                                long oldestRevTimeStamp,
                                VersionGCStats stats)
focal_class.full_signature:  void deleteSplitDocuments(Set<SplitDocType> gcTypes,
                                RevisionVector sweepRevs,
                                long oldestRevTimeStamp,
                                VersionGCStats stats)
focal_class.identifier: deleteSplitDocuments
focal_class.parameters: (Set<SplitDocType> gcTypes,
                                RevisionVector sweepRevs,
                                long oldestRevTimeStamp,
                                VersionGCStats stats)
focal_class.return: void
focal_class.signature: void deleteSplitDocuments(Set<SplitDocType> gcTypes,
                                RevisionVector sweepRevs,
                                long oldestRevTimeStamp,
                                VersionGCStats stats)
focal_class.class_method_signature: VersionGCSupport.createCleanUp(Set<SplitDocType> gcTypes,
                                                   RevisionVector sweepRevs,
                                                   long oldestRevTimeStamp,
                                                   VersionGCStats stats)
focal_class.full_signature: protected SplitDocumentCleanUp createCleanUp(Set<SplitDocType> gcTypes,
                                                   RevisionVector sweepRevs,
                                                   long oldestRevTimeStamp,
                                                   VersionGCStats stats)
focal_class.identifier: createCleanUp
focal_class.modifiers: protected
focal_class.parameters: (Set<SplitDocType> gcTypes,
                                                   RevisionVector sweepRevs,
                                                   long oldestRevTimeStamp,
                                                   VersionGCStats stats)
focal_class.return: SplitDocumentCleanUp
focal_class.signature: SplitDocumentCleanUp createCleanUp(Set<SplitDocType> gcTypes,
                                                   RevisionVector sweepRevs,
                                                   long oldestRevTimeStamp,
                                                   VersionGCStats stats)
focal_class.class_method_signature: VersionGCSupport.identifyGarbage(final Set<SplitDocType> gcTypes,
                                                       final RevisionVector sweepRevs,
                                                       final long oldestRevTimeStamp)
focal_class.full_signature: protected Iterable<NodeDocument> identifyGarbage(final Set<SplitDocType> gcTypes,
                                                       final RevisionVector sweepRevs,
                                                       final long oldestRevTimeStamp)
focal_class.identifier: identifyGarbage
focal_class.modifiers: protected
focal_class.parameters: (final Set<SplitDocType> gcTypes,
                                                       final RevisionVector sweepRevs,
                                                       final long oldestRevTimeStamp)
focal_class.return: Iterable<NodeDocument>
focal_class.signature: Iterable<NodeDocument> identifyGarbage(final Set<SplitDocType> gcTypes,
                                                       final RevisionVector sweepRevs,
                                                       final long oldestRevTimeStamp)
focal_class.class_method_signature: VersionGCSupport.getOldestDeletedOnceTimestamp(Clock clock, long precisionMs)
focal_class.full_signature: public long getOldestDeletedOnceTimestamp(Clock clock, long precisionMs)
focal_class.identifier: getOldestDeletedOnceTimestamp
focal_class.modifiers: public
focal_class.parameters: (Clock clock, long precisionMs)
focal_class.return: long
focal_class.signature: long getOldestDeletedOnceTimestamp(Clock clock, long precisionMs)
focal_class.class_method_signature: VersionGCSupport.getDeletedOnceCount()
focal_class.full_signature: public long getDeletedOnceCount()
focal_class.identifier: getDeletedOnceCount
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getDeletedOnceCount()
focal_class.class_method_signature: VersionGCSupport.isDefaultNoBranchSplitNewerThan(NodeDocument doc,
                                                               RevisionVector sweepRevs)
focal_class.full_signature: protected static boolean isDefaultNoBranchSplitNewerThan(NodeDocument doc,
                                                               RevisionVector sweepRevs)
focal_class.identifier: isDefaultNoBranchSplitNewerThan
focal_class.modifiers: protected static
focal_class.parameters: (NodeDocument doc,
                                                               RevisionVector sweepRevs)
focal_class.return: boolean
focal_class.signature: boolean isDefaultNoBranchSplitNewerThan(NodeDocument doc,
                                                               RevisionVector sweepRevs)
focal_method.body: public Iterable<NodeDocument> getPossiblyDeletedDocs(final long fromModified,
                                                           final long toModified) {
          return filter(getSelectedDocuments(store, NodeDocument.DELETED_ONCE, 1), new Predicate<NodeDocument>() {
              @Override
              public boolean apply(NodeDocument input) {
                  return input.wasDeletedOnce()
                          && modifiedGreaterThanEquals(input, fromModified)
                          && modifiedLessThan(input, toModified);
              }
  
              private boolean modifiedGreaterThanEquals(NodeDocument doc,
                                                        long time) {
                  Long modified = doc.getModified();
                  return modified != null && modified.compareTo(getModifiedInSecs(time)) >= 0;
              }
  
              private boolean modifiedLessThan(NodeDocument doc,
                                               long time) {
                  Long modified = doc.getModified();
                  return modified != null && modified.compareTo(getModifiedInSecs(time)) < 0;
              }
          });
      }
focal_method.class_method_signature: VersionGCSupport.getPossiblyDeletedDocs(final long fromModified,
                                                           final long toModified)
focal_method.full_signature: public Iterable<NodeDocument> getPossiblyDeletedDocs(final long fromModified,
                                                           final long toModified)
focal_method.identifier: getPossiblyDeletedDocs
focal_method.invocations: filter getSelectedDocuments wasDeletedOnce modifiedGreaterThanEquals modifiedLessThan getModified compareTo getModifiedInSecs getModified compareTo getModifiedInSecs
focal_method.modifiers: public
focal_method.parameters: (final long fromModified,
                                                           final long toModified)
focal_method.return: Iterable<NodeDocument>
focal_method.signature: Iterable<NodeDocument> getPossiblyDeletedDocs(final long fromModified,
                                                           final long toModified)