test_class.declarator: AFTER = createAfter()
test_class.modifier: private static final
test_class.original_string: private static final NodeState AFTER = createAfter();
test_class.type: NodeState
test_class.var_name: AFTER
test_class.declarator: limiter
test_class.modifier: private
test_class.original_string: private CommitRateLimiter limiter;
test_class.type: CommitRateLimiter
test_class.var_name: limiter
test_class.declarator: commit = new FutureTask<Long>(new Callable<Long>() {
          @Override
          public Long call() throws Exception {
              long t0 = Clock.ACCURATE.getTime();
              Clock.ACCURATE.waitUntil(Clock.ACCURATE.getTime() + 100);
              assertSame(AFTER, limiter.processCommit(EMPTY_NODE, AFTER, null));
              return Clock.ACCURATE.getTime() - t0;
          }
      })
test_class.modifier: private final
test_class.original_string: private final FutureTask<Long> commit = new FutureTask<Long>(new Callable<Long>() {
          @Override
          public Long call() throws Exception {
              long t0 = Clock.ACCURATE.getTime();
              Clock.ACCURATE.waitUntil(Clock.ACCURATE.getTime() + 100);
              assertSame(AFTER, limiter.processCommit(EMPTY_NODE, AFTER, null));
              return Clock.ACCURATE.getTime() - t0;
          }
      });
test_class.type: FutureTask<Long>
test_class.var_name: commit
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/CommitRateLimiterTest.java
test_class.identifier: CommitRateLimiterTest
test_case.body: @Test
      public void delayCommitsWithReset() throws InterruptedException, ExecutionException, TimeoutException {
          limiter.setDelay(10000);
          new Thread(commit).start();
          limiter.setDelay(0);
          assertTrue(commit.get(1, TimeUnit.SECONDS) >= 100);
      }
test_case.class_method_signature: CommitRateLimiterTest.delayCommitsWithReset()
test_case.full_signature: @Test public void delayCommitsWithReset()
test_case.identifier: delayCommitsWithReset
test_case.invocations: setDelay start setDelay assertTrue get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void delayCommitsWithReset()
focal_class.declarator: LOG = LoggerFactory.getLogger(CommitRateLimiter.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(CommitRateLimiter.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: blockCommits
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean blockCommits;
focal_class.type: boolean
focal_class.var_name: blockCommits
focal_class.declarator: delay
focal_class.modifier: private volatile
focal_class.original_string: private volatile long delay;
focal_class.type: long
focal_class.var_name: delay
focal_class.declarator: NON_BLOCKING_LEVEL = 
              new ThreadLocal<AtomicInteger>()
focal_class.modifier: private static
focal_class.original_string: private static ThreadLocal<AtomicInteger> NON_BLOCKING_LEVEL = 
              new ThreadLocal<AtomicInteger>();
focal_class.type: ThreadLocal<AtomicInteger>
focal_class.var_name: NON_BLOCKING_LEVEL
focal_class.declarator: EXCEPTION_ON_BLOCK = 
              Boolean.getBoolean("oak.commitRateLimiter.exceptionOnBlock")
focal_class.modifier: private static
focal_class.original_string: private static boolean EXCEPTION_ON_BLOCK = 
              Boolean.getBoolean("oak.commitRateLimiter.exceptionOnBlock");
focal_class.type: boolean
focal_class.var_name: EXCEPTION_ON_BLOCK
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/CommitRateLimiter.java
focal_class.identifier: CommitRateLimiter
focal_class.interfaces: implements CommitHook
focal_class.class_method_signature: CommitRateLimiter.blockCommits()
focal_class.full_signature: public void blockCommits()
focal_class.identifier: blockCommits
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void blockCommits()
focal_class.class_method_signature: CommitRateLimiter.unblockCommits()
focal_class.full_signature: public void unblockCommits()
focal_class.identifier: unblockCommits
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void unblockCommits()
focal_class.class_method_signature: CommitRateLimiter.getBlockCommits()
focal_class.full_signature: public boolean getBlockCommits()
focal_class.identifier: getBlockCommits
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean getBlockCommits()
focal_class.class_method_signature: CommitRateLimiter.setDelay(long delay)
focal_class.full_signature: public void setDelay(long delay)
focal_class.identifier: setDelay
focal_class.modifiers: public
focal_class.parameters: (long delay)
focal_class.return: void
focal_class.signature: void setDelay(long delay)
focal_class.class_method_signature: CommitRateLimiter.processCommit(NodeState before, NodeState after, CommitInfo info)
focal_class.full_signature: @NotNull @Override public NodeState processCommit(NodeState before, NodeState after, CommitInfo info)
focal_class.identifier: processCommit
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (NodeState before, NodeState after, CommitInfo info)
focal_class.return: NodeState
focal_class.signature: NodeState processCommit(NodeState before, NodeState after, CommitInfo info)
focal_class.class_method_signature: CommitRateLimiter.blockCommit()
focal_class.full_signature: public void blockCommit()
focal_class.identifier: blockCommit
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void blockCommit()
focal_class.class_method_signature: CommitRateLimiter.delay()
focal_class.full_signature: protected void delay()
focal_class.identifier: delay
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void delay()
focal_class.class_method_signature: CommitRateLimiter.beforeNonBlocking()
focal_class.full_signature: public void beforeNonBlocking()
focal_class.identifier: beforeNonBlocking
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void beforeNonBlocking()
focal_class.class_method_signature: CommitRateLimiter.afterNonBlocking()
focal_class.full_signature: public void afterNonBlocking()
focal_class.identifier: afterNonBlocking
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void afterNonBlocking()
focal_class.class_method_signature: CommitRateLimiter.isThreadBlocking()
focal_class.full_signature: public boolean isThreadBlocking()
focal_class.identifier: isThreadBlocking
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isThreadBlocking()
focal_method.body: public void setDelay(long delay) {
          if (LOG.isTraceEnabled()) {
              if (this.delay != delay) {
                  // only log if the delay has changed
                  LOG.trace("setDelay: delay changed from " + this.delay + " to " + delay);
              }
          }
          this.delay = delay;
          if (delay == 0) {
              synchronized (this) {
                  this.notifyAll();
              }
          }
      }
focal_method.class_method_signature: CommitRateLimiter.setDelay(long delay)
focal_method.full_signature: public void setDelay(long delay)
focal_method.identifier: setDelay
focal_method.invocations: isTraceEnabled trace notifyAll
focal_method.modifiers: public
focal_method.parameters: (long delay)
focal_method.return: void
focal_method.signature: void setDelay(long delay)