public long? GetExpectedEndTime(ContextManagerRealization realization)
 {
     var agentInstanceContext = realization.AgentInstanceContextCreate;
     var current = agentInstanceContext.SchedulingService.Time;
     var msec = TimePeriodCompute.DeltaAdd(current, null, true, agentInstanceContext);
     return current + msec;
 }
Ejemplo n.º 2
0
 public ContextControllerInitTerm(
     ContextControllerInitTermFactory factory,
     ContextManagerRealization realization)
 {
     this.factory = factory;
     this.realization = realization;
 }
Ejemplo n.º 3
0
 public ContextControllerKeyed(
     ContextManagerRealization realization,
     ContextControllerKeyedFactory factory)
     : base(realization)
 {
     this.factory = factory;
 }
Ejemplo n.º 4
0
 public ContextControllerInitTermBase(
     ContextControllerInitTermFactory factory,
     ContextManagerRealization realization)
     : base(factory, realization)
 {
     initTermSvc = ContextControllerInitTermUtil.GetService(factory);
 }
Ejemplo n.º 5
0
        public StatementAgentInstanceFactoryCreateContextResult(
            Viewable finalView,
            AgentInstanceStopCallback stopCallback,
            AgentInstanceContext agentInstanceContext,
            AggregationService optionalAggegationService,
            IDictionary<int, SubSelectFactoryResult> subselectStrategies,
            PriorEvalStrategy[] priorStrategies,
            PreviousGetterStrategy[] previousGetterStrategies,
            RowRecogPreviousStrategy regexExprPreviousEvalStrategy,
            IDictionary<int, ExprTableEvalStrategy> tableAccessStrategies,
            IList<StatementAgentInstancePreload> preloadList,
            ContextManagerRealization contextManagerRealization)
            : base(
                finalView,
                stopCallback,
                agentInstanceContext,
                optionalAggegationService,
                subselectStrategies,
                priorStrategies,
                previousGetterStrategies,
                regexExprPreviousEvalStrategy,
                tableAccessStrategies,
                preloadList)

        {
            this.contextManagerRealization = contextManagerRealization;
        }
Ejemplo n.º 6
0
 public ContextControllerCategory(
     ContextManagerRealization realization,
     ContextControllerCategoryFactory factory)
     : base(realization)
 {
     this.factory = factory;
 }
Ejemplo n.º 7
0
 public ContextControllerKeyedImpl(
     ContextControllerKeyedFactory factory,
     ContextManagerRealization realization)
     : base(realization, factory)
 {
     keyedSvc = ContextControllerKeyedUtil.GetService(factory, realization);
 }
Ejemplo n.º 8
0
 public ContextControllerHashImpl(
     ContextControllerHashFactory factory,
     ContextManagerRealization realization)
     : base(realization, factory)
 {
     hashSvc = ContextControllerHashUtil.MakeService(factory, realization);
 }
 public ContextControllerInitTermNonOverlap(
     ContextControllerInitTermFactory factory,
     ContextManagerRealization realization)
     : base(
         factory,
         realization)
 {
 }
Ejemplo n.º 10
0
        protected internal static ContextControllerKeyedSvc GetService(
            ContextControllerKeyedFactory factory,
            ContextManagerRealization realization)
        {
            if (factory.FactoryEnv.IsRoot) {
                return new ContextControllerKeyedSvcLevelOne();
            }

            return new ContextControllerKeyedSvcLevelAny();
        }
Ejemplo n.º 11
0
 public long? GetExpectedEndTime(
     ContextManagerRealization realization,
     ScheduleSpec[] scheduleSpecs)
 {
     var importService = realization.AgentInstanceContextCreate.ImportServiceRuntime;
     return ContextControllerInitTermUtil.ComputeScheduleMinimumNextOccurance(
         scheduleSpecs,
         realization.AgentInstanceContextCreate.TimeProvider.Time,
         importService);
 }
Ejemplo n.º 12
0
 public long? GetExpectedEndTime(
     ContextManagerRealization realization,
     ScheduleSpec scheduleSpec)
 {
     var classpathImportService = realization.AgentInstanceContextCreate.ImportServiceRuntime;
     return ScheduleComputeHelper.ComputeNextOccurance(
         scheduleSpec,
         realization.AgentInstanceContextCreate.TimeProvider.Time,
         classpathImportService.TimeZone,
         classpathImportService.TimeAbacus);
 }
Ejemplo n.º 13
0
        public static ContextControllerHashSvc MakeService(
            ContextControllerHashFactory factory,
            ContextManagerRealization realization)
        {
            var factories = realization.ContextManager.ContextDefinition.ControllerFactories;
            var preallocate = factory.HashSpec.IsPreallocate;
            if (factories.Length == 1) {
                return new ContextControllerHashSvcLevelOne(preallocate);
            }

            return new ContextControllerHashSvcLevelAny(preallocate);
        }
Ejemplo n.º 14
0
 public ContextControllerCategoryImpl(
     ContextManagerRealization realization,
     ContextControllerCategoryFactory factory)
     : base(realization, factory)
 {
     if (factory.FactoryEnv.IsRoot) {
         CategorySvc = new ContextControllerCategorySvcLevelOne();
     }
     else {
         CategorySvc = new ContextControllerCategorySvcLevelAny();
     }
 }
Ejemplo n.º 15
0
        public ContextControllerInitTermOverlap(
            ContextControllerInitTermFactory factory,
            ContextManagerRealization realization)
            : base(factory, realization)

        {
            if (factory.InitTermSpec.DistinctEval != null) {
                if (factory.FactoryEnv.NumNestingLevels == 1) {
                    distinctSvc = new ContextControllerInitTermDistinctSvcNonNested();
                }
                else {
                    distinctSvc = new ContextControllerInitTermDistinctSvcNested();
                }

                eventsPerStreamDistinct = new EventBean[1];
                distinctLastTriggerEvents = new LRUCache<object, EventBean>(16);
            }
            else {
                distinctSvc = null;
                distinctLastTriggerEvents = null;
                eventsPerStreamDistinct = null;
            }
        }
Ejemplo n.º 16
0
 public abstract ContextController Create(ContextManagerRealization contextManagerRealization);
Ejemplo n.º 17
0
 public ContextControllerBase(ContextManagerRealization realization)
 {
     this.realization = realization;
 }
 public override ContextController Create(ContextManagerRealization contextManagerRealization)
 {
     return new ContextControllerCategoryImpl(contextManagerRealization, this);
 }