Examples of TimerService


Examples of org.drools.time.TimerService

        }
    }

    public void expireTuples(final Object context,
                             final InternalWorkingMemory workingMemory) {
        TimerService clock = workingMemory.getTimerService();
        long currentTime = clock.getCurrentTime();
        SlidingTimeWindowContext queue = (SlidingTimeWindowContext) context;
        RightTuple tuple = queue.queue.peek();
        while ( tuple != null && isExpired( currentTime,
                                            tuple ) ) {
            queue.expiringTuple = tuple;
View Full Code Here

Examples of org.drools.time.TimerService

     */
    private static void updateNextExpiration(final RightTuple rightTuple,
                                      final InternalWorkingMemory workingMemory,
                                      final SlidingTimeWindow stw,
                                      final Object context) {
        TimerService clock = workingMemory.getTimerService();
        if ( rightTuple != null ) {
            long nextTimestamp = ((EventFactHandle) rightTuple.getFactHandle()).getStartTimestamp() + stw.getSize();
            JobContext jobctx = new BehaviorJobContext( workingMemory,
                                                        stw,
                                                        context );
            JobHandle handle = clock.scheduleJob( job,
                                                  jobctx,
                                                  new PointInTimeTrigger( nextTimestamp, null, null ) );
            jobctx.setJobHandle( handle );
        }
    }
View Full Code Here

Examples of org.waveprotocol.wave.client.scheduler.TimerService

      WavePanelImpl panel = stageOne.getWavePanel();
      FocusFramePresenter focus = stageOne.getFocusFrame();
      ModelAsViewProvider views = stageTwo.getModelAsViewProvider();
      DocumentRegistry<? extends InteractiveDocument> documents = stageTwo.getDocumentRegistry();
      String address = stageTwo.getSignedInUser().getAddress();
      TimerService clock = SchedulerInstance.getLowPriorityTimer();
      String sessionId = stageTwo.getSessionId();

      SelectionExtractor selectionExtractor = new SelectionExtractor(clock, address, sessionId);
      return EditSession.install(views, documents, selectionExtractor, focus, panel);
    }
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.