Ejemplo n.º 1
0
        public static ContextPartitionIdentifierInitiatedTerminated KeyToIdentifier(
            int subpathIdOrCPId,
            ContextControllerInitTermPartitionKey key,
            ContextControllerInitTerm controller)
        {
            var identifier = new ContextPartitionIdentifierInitiatedTerminated();
            identifier.StartTime = key.StartTime;
            identifier.EndTime = key.ExpectedEndTime;

            var start = controller.InitTermFactory.InitTermSpec.StartCondition;
            if (start is ContextConditionDescriptorFilter) {
                var filter = (ContextConditionDescriptorFilter) start;
                if (filter.OptionalFilterAsName != null) {
                    identifier.Properties = Collections.SingletonDataMap(
                        filter.OptionalFilterAsName,
                        key.TriggeringEvent);
                }
            }

            if (controller.Factory.FactoryEnv.IsLeaf) {
                identifier.ContextPartitionId = subpathIdOrCPId;
            }

            return identifier;
        }
 public ContextControllerInitTermSvcEntry(
     int subpathIdOrCPId,
     ContextControllerConditionNonHA terminationCondition,
     ContextControllerInitTermPartitionKey partitionKey)
 {
     SubpathIdOrCPId = subpathIdOrCPId;
     TerminationCondition = terminationCondition;
     PartitionKey = partitionKey;
 }
Ejemplo n.º 3
0
 public void EndCreate(
     IntSeqKey endConditionPath,
     int subpathIdOrCPId,
     ContextControllerConditionNonHA endCondition,
     ContextControllerInitTermPartitionKey partitionKey)
 {
     endConditions.Put(
         ((IntSeqKeyOne) endConditionPath).One,
         new ContextControllerInitTermSvcEntry(subpathIdOrCPId, endCondition, partitionKey));
 }