Package com.twitter.common.util

Examples of com.twitter.common.util.Clock


  private Capture<Command> replayAndCreateLifecycle() {
    Capture<Command> shutdownCommand = createCapture();
    shutdownRegistry.addAction(capture(shutdownCommand));

    Clock clock = createMock(Clock.class);

    control.replay();

    schedulerLifecycle = new SchedulerLifecycle(
        driverFactory,
View Full Code Here


  private Capture<ExceptionalCommand<?>> replayAndCreateLifecycle() {
    Capture<ExceptionalCommand<?>> shutdownCommand = createCapture();
    shutdownRegistry.addAction(capture(shutdownCommand));

    Clock clock = createMock(Clock.class);

    control.replay();

    schedulerLifecycle = new SchedulerLifecycle(
        storageUtil.storage,
View Full Code Here

    final ScheduledExecutorService executor = createMock(ScheduledExecutorService.class);
    FakeScheduledExecutor executorClock =
        FakeScheduledExecutor.scheduleAtFixedRateExecutor(executor, 2);

    Clock mockClock = createMock(Clock.class);
    expect(mockClock.nowMillis()).andReturn(2L).times(2);

    expect(storageUtil.jobUpdateStore.pruneHistory(1, 1)).andReturn(ImmutableSet.of("id1", "id2"));
    expect(storageUtil.jobUpdateStore.pruneHistory(1, 1)).andReturn(ImmutableSet.<String>of());

    control.replay();
View Full Code Here

TOP

Related Classes of com.twitter.common.util.Clock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.