@Test(timeout = 2_000) public void enqueueDoesNotBlock() { doAnswer(invocation -> { Uninterruptibles.sleepUninterruptibly(30, TimeUnit.SECONDS); return null; }).when(timelockService).tryUnlock(any()); unlocker.enqueue(ImmutableSet.copyOf(tokenList)); }
@Override @SuppressWarnings("FutureReturnValueIgnored") public void enqueue(Set<LockToken> tokens) { autobatcher.apply(tokens); }
AsyncTimeLockUnlocker implements TimeLockUnlocker, AutoCloseable { @Override @SuppressWarnings("FutureReturnValueIgnored") public void enqueue(Set<LockToken> tokens) { autobatcher.apply(tokens); } }
AsyncTimeLockUnlocker implements TimeLockUnlocker, AutoCloseable { @Override @SuppressWarnings("FutureReturnValueIgnored") public void enqueue(Set<LockToken> tokens) { autobatcher.apply(tokens); } private  AsyncTimeLockUnlocker(DisruptorAutobatcher<Set<LockToken>, Void> autobatcher); }
AsyncTimeLockUnlocker implements TimeLockUnlocker, AutoCloseable { @Override @SuppressWarnings("FutureReturnValueIgnored") public void enqueue(Set<LockToken> tokens) { autobatcher.apply(tokens); } private  AsyncTimeLockUnlocker(DisruptorAutobatcher<Set<LockToken>, Void> autobatcher); static AsyncTimeLockUnlocker create(TimelockService timelockService); @Override @SuppressWarnings("FutureReturnValueIgnored") void enqueue(Set<LockToken> tokens); @Override void close(); }
AsyncTimeLockUnlocker implements TimeLockUnlocker, AutoCloseable { @Override @SuppressWarnings("FutureReturnValueIgnored") public void enqueue(Set<LockToken> tokens) { autobatcher.apply(tokens); } private  AsyncTimeLockUnlocker(DisruptorAutobatcher<Set<LockToken>, Void> autobatcher); static AsyncTimeLockUnlocker create(TimelockService timelockService); @Override @SuppressWarnings("FutureReturnValueIgnored") void enqueue(Set<LockToken> tokens); @Override void close();  }