Examples of updateTime()


Examples of javax.sql.rowset.spi.SyncResolver.updateTime()

            fail("should throw UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            // expected
        }
        try {
            resolver.updateTime("not", null);
            fail("should throw UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            // expected
        }
        try {
View Full Code Here

Examples of javax.sql.rowset.spi.SyncResolver.updateTime()

            fail("should throw UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            // expected
        }
        try {
            resolver.updateTime(100, null);
            fail("should throw UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            // expected
        }
        try {
View Full Code Here

Examples of org.apache.accumulo.server.util.time.BaseRelativeTime.updateTime()

    BogusTime now = new BogusTime();
    now.value = bt.value = System.currentTimeMillis();
   
    BaseRelativeTime brt = new BaseRelativeTime(now);
    assertEquals(brt.currentTime(), now.value);
    brt.updateTime(now.value);
    assertEquals(brt.currentTime(), now.value);
  }
 
  @Test
  public void testFutureTime() {
View Full Code Here

Examples of org.apache.accumulo.server.util.time.BaseRelativeTime.updateTime()

    // Ten seconds into the future
    advice.value += 10000;
   
    BaseRelativeTime brt = new BaseRelativeTime(local);
    assertEquals(brt.currentTime(), local.value);
    brt.updateTime(advice.value);
    long once = brt.currentTime();
    assertTrue(once < advice.value);
    assertTrue(once > local.value);
   
    for (int i = 0; i < 100; i++) {
View Full Code Here

Examples of org.apache.accumulo.server.util.time.BaseRelativeTime.updateTime()

    long once = brt.currentTime();
    assertTrue(once < advice.value);
    assertTrue(once > local.value);
   
    for (int i = 0; i < 100; i++) {
      brt.updateTime(advice.value);
    }
    long many = brt.currentTime();
    assertTrue(many > once);
    assertTrue("after much advice, relative time is still closer to local time", (advice.value - many) < (once - local.value));
  }
View Full Code Here

Examples of org.apache.accumulo.server.util.time.BaseRelativeTime.updateTime()

    local.value = advice.value = System.currentTimeMillis();
    // Ten seconds into the past
    advice.value -= 10000;
   
    BaseRelativeTime brt = new BaseRelativeTime(local);
    brt.updateTime(advice.value);
    long once = brt.currentTime();
    assertTrue(once < local.value);
    brt.updateTime(advice.value);
    long twice = brt.currentTime();
    assertTrue("Time cannot go backwards", once <= twice);
View Full Code Here

Examples of org.apache.accumulo.server.util.time.BaseRelativeTime.updateTime()

   
    BaseRelativeTime brt = new BaseRelativeTime(local);
    brt.updateTime(advice.value);
    long once = brt.currentTime();
    assertTrue(once < local.value);
    brt.updateTime(advice.value);
    long twice = brt.currentTime();
    assertTrue("Time cannot go backwards", once <= twice);
    brt.updateTime(advice.value - 10000);
    assertTrue("Time cannot go backwards", once <= twice);
  }
View Full Code Here

Examples of org.apache.accumulo.server.util.time.BaseRelativeTime.updateTime()

    long once = brt.currentTime();
    assertTrue(once < local.value);
    brt.updateTime(advice.value);
    long twice = brt.currentTime();
    assertTrue("Time cannot go backwards", once <= twice);
    brt.updateTime(advice.value - 10000);
    assertTrue("Time cannot go backwards", once <= twice);
  }
 
}
View Full Code Here

Examples of org.apache.s4.util.clock.EventClock.updateTime()

        ApplicationContext context = coreContext;       
       
        Clock clock = (Clock) context.getBean("clock");
        if (clock instanceof EventClock && seedTime > 0) {
            EventClock s4EventClock = (EventClock)clock;
            s4EventClock.updateTime(seedTime);
            System.out.println("Intializing event clock time with seed time " + s4EventClock.getCurrentTime());
        }
       
        PEContainer peContainer = (PEContainer) context.getBean("peContainer");
View Full Code Here

Examples of org.apache.s4.util.clock.EventClock.updateTime()

        ApplicationContext context = coreContext;

        Clock clock = (Clock) context.getBean("clock");
        if (clock instanceof EventClock && seedTime > 0) {
            EventClock s4EventClock = (EventClock) clock;
            s4EventClock.updateTime(seedTime);
            System.out.println("Intializing event clock time with seed time "
                    + s4EventClock.getCurrentTime());
        }

        PEContainer peContainer = (PEContainer) context.getBean("peContainer");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.