Package io.s4.util.clock

Examples of io.s4.util.clock.EventClock


   @Test
   public void testCloneAndInitialize() {
       MockPE prototype = new MockPE();
       prototype.setInitMethod("testInitialize");
      
       PrototypeWrapper prototypeWrapper = new PrototypeWrapper(prototype, new WallClock());

       assertEquals(0, prototype.getInitializeCount());
       MockPE instance = (MockPE)prototypeWrapper.getPE("asd");
       assertNotNull(instance);
      
View Full Code Here


        coreContext = new FileSystemXmlApplicationContext(coreConfigFileUrls, coreContext);
        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");

        Watcher w = (Watcher) context.getBean("watcher");
View Full Code Here

        while (true) {
            EventWrapper eventWrapper = null;
            try {
                eventWrapper = workQueue.take();
                if (clock instanceof EventClock) {
                    EventClock eventClock = (EventClock) clock;
                    eventClock.update(eventWrapper);
                    // To what time to update the clock
                }
                if (trackByKey) {
                    boolean foundOne = false;
                    for (CompoundKeyInfo compoundKeyInfo : eventWrapper.getCompoundKeys()) {
View Full Code Here

                coreContext);
        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");

        Watcher w = (Watcher) context.getBean("watcher");
View Full Code Here

    static EventClock s4Clock;
    static Persister persister;

    public static void main(String[] args) {
        TestPersisterEventClock testPersisterClock = new TestPersisterEventClock();
        s4Clock = new EventClock();
        s4Clock.updateTime(69990000);
        TimeUpdaterThread timeUpdater = new TimeUpdaterThread(s4Clock);
        Thread timeUpdaterThread = new Thread(timeUpdater);
        timeUpdaterThread.start();
        persister = new HashMapPersister(s4Clock);
View Full Code Here

TOP

Related Classes of io.s4.util.clock.EventClock

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.