CommitRateLimiter implements CommitHook { @NotNull @Override public NodeState processCommit(NodeState before, NodeState after, CommitInfo info) throws CommitFailedException { if (blockCommits && isThreadBlocking()) { blockCommit(); } else { delay(); } return after; }  void blockCommits(); void unblockCommits(); boolean getBlockCommits(); void setDelay(long delay); @NotNull @Override NodeState processCommit(NodeState before, NodeState after, CommitInfo info); void blockCommit(); void beforeNonBlocking(); void afterNonBlocking(); boolean isThreadBlocking();  }
@Test public void commit() throws CommitFailedException { assertSame(AFTER, limiter.processCommit(EMPTY_NODE, AFTER, null)); }