MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / newTimeout

Method newTimeout

test/BaseTestHBaseClient.java:311–328  ·  view source on GitHub ↗
(final TimerTask task,
                              final long delay,
                              final TimeUnit unit)

Source from the content-addressed store, hash-verified

309 boolean run = true;
310
311 @Override
312 public Timeout newTimeout(final TimerTask task,
313 final long delay,
314 final TimeUnit unit) {
315 try {
316 tasks.add(new AbstractMap.SimpleEntry<TimerTask, Long>(task, delay));
317 if (run) {
318 task.run(null); // Argument never used in this code base.
319 }
320 final Timeout timeout = mock(Timeout.class);
321 timeouts.add(timeout);
322 return timeout; // Return value never used in this code base.
323 } catch (RuntimeException e) {
324 throw e;
325 } catch (Exception e) {
326 throw new RuntimeException("Timer task failed: " + task, e);
327 }
328 }
329
330 @Override
331 public Set<Timeout> stop() {

Calls 2

addMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected