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: LOG = LoggerFactory.getLogger(CommitQueueTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(CommitQueueTest.class);
test_class.type: Logger
test_class.var_name: LOG
test_class.declarator: NUM_WRITERS = 10
test_class.modifier: private static final
test_class.original_string: private static final int NUM_WRITERS = 10;
test_class.type: int
test_class.var_name: NUM_WRITERS
test_class.declarator: COMMITS_PER_WRITER = 100
test_class.modifier: private static final
test_class.original_string: private static final int COMMITS_PER_WRITER = 100;
test_class.type: int
test_class.var_name: COMMITS_PER_WRITER
test_class.declarator: exceptions = synchronizedList(new ArrayList<Exception>())
test_class.modifier: private
test_class.original_string: private List<Exception> exceptions = synchronizedList(new ArrayList<Exception>());
test_class.type: List<Exception>
test_class.var_name: exceptions
test_class.file: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/CommitQueueTest.java
test_class.identifier: CommitQueueTest
test_case.body: @Test
      public void branchCommitMustNotBlockTrunkCommit() throws Exception {
          final DocumentNodeStore ds = builderProvider.newBuilder().getNodeStore();
  
          // simulate start of a branch commit
          Commit c = ds.newCommit(nop -> {}, ds.getHeadRevision().asBranchRevision(ds.getClusterId()), null);
  
          Thread t = new Thread(new Runnable() {
              @Override
              public void run() {
                  try {
                      NodeBuilder builder = ds.getRoot().builder();
                      builder.child("foo");
                      ds.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
                  } catch (CommitFailedException e) {
                      exceptions.add(e);
                  }
              }
          });
          t.start();
  
          t.join(3000);
          assertFalse("Commit did not succeed within 3 seconds", t.isAlive());
  
          ds.canceled(c);
          assertNoExceptions();
      }
test_case.class_method_signature: CommitQueueTest.branchCommitMustNotBlockTrunkCommit()
test_case.full_signature: @Test public void branchCommitMustNotBlockTrunkCommit()
test_case.identifier: branchCommitMustNotBlockTrunkCommit
test_case.invocations: getNodeStore newBuilder newCommit asBranchRevision getHeadRevision getClusterId builder getRoot child merge add start join assertFalse isAlive canceled assertNoExceptions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void branchCommitMustNotBlockTrunkCommit()
focal_class.declarator: LOG = LoggerFactory.getLogger(CommitQueue.class)
focal_class.modifier: static final
focal_class.original_string: static final Logger LOG = LoggerFactory.getLogger(CommitQueue.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: DEFAULT_SUSPEND_TIMEOUT = TimeUnit.MINUTES.toMillis(1)
focal_class.modifier: static final
focal_class.original_string: static final long DEFAULT_SUSPEND_TIMEOUT = TimeUnit.MINUTES.toMillis(1);
focal_class.type: long
focal_class.var_name: DEFAULT_SUSPEND_TIMEOUT
focal_class.declarator: commits = new TreeMap<Revision, Entry>(StableRevisionComparator.INSTANCE)
focal_class.modifier: private final
focal_class.original_string: private final SortedMap<Revision, Entry> commits = new TreeMap<Revision, Entry>(StableRevisionComparator.INSTANCE);
focal_class.type: SortedMap<Revision, Entry>
focal_class.var_name: commits
focal_class.declarator: suspendedCommits = Maps.newIdentityHashMap()
focal_class.modifier: private final
focal_class.original_string: private final Map<Semaphore, SuspendedCommit> suspendedCommits = Maps.newIdentityHashMap();
focal_class.type: Map<Semaphore, SuspendedCommit>
focal_class.var_name: suspendedCommits
focal_class.declarator: context
focal_class.modifier: private final
focal_class.original_string: private final RevisionContext context;
focal_class.type: RevisionContext
focal_class.var_name: context
focal_class.declarator: statsCollector
              = new DocumentNodeStoreStats(StatisticsProvider.NOOP)
focal_class.modifier: private
focal_class.original_string: private DocumentNodeStoreStatsCollector statsCollector
              = new DocumentNodeStoreStats(StatisticsProvider.NOOP);
focal_class.type: DocumentNodeStoreStatsCollector
focal_class.var_name: statsCollector
focal_class.declarator: suspendTimeout = Long.getLong("oak.documentMK.suspendTimeoutMillis", DEFAULT_SUSPEND_TIMEOUT)
focal_class.modifier: private
focal_class.original_string: private long suspendTimeout = Long.getLong("oak.documentMK.suspendTimeoutMillis", DEFAULT_SUSPEND_TIMEOUT);
focal_class.type: long
focal_class.var_name: suspendTimeout
focal_class.file: oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/CommitQueue.java
focal_class.identifier: CommitQueue
focal_class.class_method_signature: CommitQueue.CommitQueue(@NotNull RevisionContext context)
focal_class.full_signature:   CommitQueue(@NotNull RevisionContext context)
focal_class.identifier: CommitQueue
focal_class.parameters: (@NotNull RevisionContext context)
focal_class.signature:  CommitQueue(@NotNull RevisionContext context)
focal_class.class_method_signature: CommitQueue.setStatisticsCollector(@NotNull DocumentNodeStoreStatsCollector collector)
focal_class.full_signature:  void setStatisticsCollector(@NotNull DocumentNodeStoreStatsCollector collector)
focal_class.identifier: setStatisticsCollector
focal_class.parameters: (@NotNull DocumentNodeStoreStatsCollector collector)
focal_class.return: void
focal_class.signature: void setStatisticsCollector(@NotNull DocumentNodeStoreStatsCollector collector)
focal_class.class_method_signature: CommitQueue.createRevision()
focal_class.full_signature: @NotNull Revision createRevision()
focal_class.identifier: createRevision
focal_class.modifiers: @NotNull
focal_class.parameters: ()
focal_class.return: Revision
focal_class.signature: Revision createRevision()
focal_class.class_method_signature: CommitQueue.createRevisions(int num)
focal_class.full_signature: @NotNull SortedSet<Revision> createRevisions(int num)
focal_class.identifier: createRevisions
focal_class.modifiers: @NotNull
focal_class.parameters: (int num)
focal_class.return: SortedSet<Revision>
focal_class.signature: SortedSet<Revision> createRevisions(int num)
focal_class.class_method_signature: CommitQueue.done(@NotNull Revision revision, @NotNull Callback c)
focal_class.full_signature:  void done(@NotNull Revision revision, @NotNull Callback c)
focal_class.identifier: done
focal_class.parameters: (@NotNull Revision revision, @NotNull Callback c)
focal_class.return: void
focal_class.signature: void done(@NotNull Revision revision, @NotNull Callback c)
focal_class.class_method_signature: CommitQueue.canceled(@NotNull Revision rev)
focal_class.full_signature:  void canceled(@NotNull Revision rev)
focal_class.identifier: canceled
focal_class.parameters: (@NotNull Revision rev)
focal_class.return: void
focal_class.signature: void canceled(@NotNull Revision rev)
focal_class.class_method_signature: CommitQueue.contains(@NotNull Revision revision)
focal_class.full_signature:  boolean contains(@NotNull Revision revision)
focal_class.identifier: contains
focal_class.parameters: (@NotNull Revision revision)
focal_class.return: boolean
focal_class.signature: boolean contains(@NotNull Revision revision)
focal_class.class_method_signature: CommitQueue.suspendUntilAll(@NotNull Set<Revision> revisions)
focal_class.full_signature:  void suspendUntilAll(@NotNull Set<Revision> revisions)
focal_class.identifier: suspendUntilAll
focal_class.parameters: (@NotNull Set<Revision> revisions)
focal_class.return: void
focal_class.signature: void suspendUntilAll(@NotNull Set<Revision> revisions)
focal_class.class_method_signature: CommitQueue.suspendUntilAll(@NotNull Set<Revision> revisions, long suspendTimeoutMillis)
focal_class.full_signature:  void suspendUntilAll(@NotNull Set<Revision> revisions, long suspendTimeoutMillis)
focal_class.identifier: suspendUntilAll
focal_class.parameters: (@NotNull Set<Revision> revisions, long suspendTimeoutMillis)
focal_class.return: void
focal_class.signature: void suspendUntilAll(@NotNull Set<Revision> revisions, long suspendTimeoutMillis)
focal_class.class_method_signature: CommitQueue.headRevisionChanged()
focal_class.full_signature:  void headRevisionChanged()
focal_class.identifier: headRevisionChanged
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void headRevisionChanged()
focal_class.class_method_signature: CommitQueue.numSuspendedThreads()
focal_class.full_signature:  int numSuspendedThreads()
focal_class.identifier: numSuspendedThreads
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int numSuspendedThreads()
focal_class.class_method_signature: CommitQueue.setSuspendTimeoutMillis(long timeout)
focal_class.full_signature:  void setSuspendTimeoutMillis(long timeout)
focal_class.identifier: setSuspendTimeoutMillis
focal_class.parameters: (long timeout)
focal_class.return: void
focal_class.signature: void setSuspendTimeoutMillis(long timeout)
focal_class.class_method_signature: CommitQueue.notifySuspendedCommits()
focal_class.full_signature: private void notifySuspendedCommits()
focal_class.identifier: notifySuspendedCommits
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void notifySuspendedCommits()
focal_class.class_method_signature: CommitQueue.notifySuspendedCommits(@NotNull Revision revision)
focal_class.full_signature: private void notifySuspendedCommits(@NotNull Revision revision)
focal_class.identifier: notifySuspendedCommits
focal_class.modifiers: private
focal_class.parameters: (@NotNull Revision revision)
focal_class.return: void
focal_class.signature: void notifySuspendedCommits(@NotNull Revision revision)
focal_class.class_method_signature: CommitQueue.removeCommit(@NotNull Revision rev)
focal_class.full_signature: private void removeCommit(@NotNull Revision rev)
focal_class.identifier: removeCommit
focal_class.modifiers: private
focal_class.parameters: (@NotNull Revision rev)
focal_class.return: void
focal_class.signature: void removeCommit(@NotNull Revision rev)
focal_class.class_method_signature: CommitQueue.waitUntilHeadOfQueue(@NotNull Revision rev,
                                        @NotNull Callback c)
focal_class.full_signature: private void waitUntilHeadOfQueue(@NotNull Revision rev,
                                        @NotNull Callback c)
focal_class.identifier: waitUntilHeadOfQueue
focal_class.modifiers: private
focal_class.parameters: (@NotNull Revision rev,
                                        @NotNull Callback c)
focal_class.return: void
focal_class.signature: void waitUntilHeadOfQueue(@NotNull Revision rev,
                                        @NotNull Callback c)
focal_class.class_method_signature: CommitQueue.notifyHead()
focal_class.full_signature: private void notifyHead()
focal_class.identifier: notifyHead
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void notifyHead()
focal_method.body: void canceled(@NotNull Revision rev) {
          removeCommit(rev);
          notifySuspendedCommits(rev);
      }
focal_method.class_method_signature: CommitQueue.canceled(@NotNull Revision rev)
focal_method.full_signature:  void canceled(@NotNull Revision rev)
focal_method.identifier: canceled
focal_method.invocations: removeCommit notifySuspendedCommits
focal_method.parameters: (@NotNull Revision rev)
focal_method.return: void
focal_method.signature: void canceled(@NotNull Revision rev)