Pass through to provider SequenceRuleAdminSession.update_sequence_rule
6997
def save_sequence_rule(self, sequence_rule_form, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.update_resource
        if sequence_rule_form.is_for_update():
            return self.update_sequence_rule(sequence_rule_form, *args, **kwargs)
        else:
            return self.create_sequence_rule(sequence_rule_form, *args, **kwargs)
456030
private void sequenceQuery(QueryEntry entry, CompletableFuture<QueryResponse> future) {
    // Get the client's server session. If the session doesn't exist, return an unknown session error.
    ServerSessionContext session = context.getStateMachine().executor().context().sessions().getSession(entry.getSession());
    if (session == null) {
      future.complete(logResponse(QueryResponse.builder()
        .withStatus(Response.Status.ERROR)
        .withError(CopycatError.Type.UNKNOWN_SESSION_ERROR)
        .build()));
    } else {
      sequenceQuery(entry, session, future);
    }
  }
786656
private <T> Sequence<T> run(
      final QueryPlus<T> queryPlus,
      final Map<String, Object> responseContext,
      final UnaryOperator<TimelineLookup<String, ServerSelector>> timelineConverter
  )
  {
    return new SpecificQueryRunnable<>(queryPlus, responseContext).run(timelineConverter);
  }
548287
private void trainRuleOnInstance(int ruleID, Instance instance) {
        //System.out.println("Processor:"+this.processorId+": Rule:"+ruleID+" -> Counter="+counter);
		Iterator<ActiveRule> ruleIterator= this.ruleSet.iterator();
		while (ruleIterator.hasNext()) {
			ActiveRule rule = ruleIterator.next();
			if (rule.getRuleNumberID() == ruleID) {
				// Check (again) for coverage
				if (rule.isCovering(instance) == true) {
					double error = rule.computeError(instance); //Use adaptive mode error
                    boolean changeDetected = ((RuleActiveRegressionNode)rule.getLearningNode()).updateChangeDetection(error);
                    if (changeDetected == true) {
                            ruleIterator.remove();
                            
                            this.sendRemoveRuleEvent(ruleID);
                    } else {
                    	rule.updateStatistics(instance);
                    	if (rule.getInstancesSeen()  % this.gracePeriod == 0.0) {
                    		if (rule.tryToExpand(this.splitConfidence, this.tieThreshold) ) {
                    			rule.split();
                    			
                    			// expanded: update Aggregator with new/updated predicate
                    			this.sendPredicate(rule.getRuleNumberID(), rule.getLastUpdatedRuleSplitNode(), 
        								(RuleActiveRegressionNode)rule.getLearningNode());
                    		}	
                    		
                    	}
                    	
                    }
				}
				
				return;
			}
		}
	}
846397
public synchronized void reloadRulebase() throws RuleBaseException {
        long start = System.currentTimeMillis();
        reloadDeclarations();
        packageStrings.clear();

        for (RuleBaseElementId id : manager.listAll(RuleBaseElementType.Function)) {
            String packageName = id.getPackageName();
            StringBuffer packageString = getPackageString(packageName);
            String code = manager.get(id);
            packageString.append(code);
        }
        for (RuleBaseElementId id : manager.listAll(RuleBaseElementType.Rule)) {
            String packageName = id.getPackageName();
            StringBuffer packageString = getPackageString(packageName);
            String code = manager.get(id);
            String formattedRule = String.format(RULE_TEMPLATE, id.getName(), code);
            packageString.append(formattedRule);
        }
        for (RuleBaseElementId id : manager.listAll(RuleBaseElementType.Process)) {
            getPackageString(id.getPackageName());
        }
        Collection<KnowledgePackage> compiledPackages = new HashSet<KnowledgePackage>();
        if (packageStrings.isEmpty()) {
            Set<String> emptySet = Collections.emptySet();
            compiledPackages.addAll(compileDrlString("package dummy;\n" + declarations, emptySet));
        } else {
            for (Map.Entry<String, StringBuffer> entry : packageStrings.entrySet()) {
                String packageName = entry.getKey();
                StringBuffer drlCode = entry.getValue();
                Collection<String> flows = queryFlows(packageName);
                Collection<KnowledgePackage> compiledDrlPackage = compileDrlString(drlCode.toString(), flows);
                compiledPackages.addAll(compiledDrlPackage);
            }
        }
        lockRuleBase();
        clearRulebase();
        base.addKnowledgePackages(compiledPackages);
        unlockRuleBase();
        LOGGER.info("Reloading the rulebase took {}ms", System.currentTimeMillis() - start);
    }
4629
private void updateRuleIndexes(CQIE rule) {
		Function head = rule.getHead();
		ruleIndex.put(head.getFunctionSymbol(), rule);
		updateRuleIndexByBodyPredicate(rule);
	}
1277413
public void modifyColumnFamilyRule() {
    System.out.printf("%nUpdating column family %s GC rule%n", COLUMN_FAMILY_1);
    // [START bigtable_update_gc_rule]
    // Updates the column family metadata to update the GC rule.
    // Updates a column family GC rule.
    VersionRule versionRule = GCRULES.maxVersions(1);
    try {
      // ModifyColumnFamiliesRequest can be used both for adding and modifying families, here it is
      // being used to modify a family
      // Updates column family with given GC rule.
      ModifyColumnFamiliesRequest updateRequest =
          ModifyColumnFamiliesRequest.of(tableId).updateFamily(COLUMN_FAMILY_1, versionRule);
      adminClient.modifyFamilies(updateRequest);
      System.out.printf("Column family %s GC rule updated%n", COLUMN_FAMILY_1);
    } catch (NotFoundException e) {
      System.err.println("Failed to modify a non-existent column family: " + e.getMessage());
    }
    // [END bigtable_update_gc_rule]
  }
1123541
private RuleDto getRuleDto(RuleUpdate change) {
    try (DbSession dbSession = dbClient.openSession(false)) {
      RuleDto rule = dbClient.ruleDao().selectOrFailByKey(dbSession, change.getOrganization(), change.getRuleKey());
      if (RuleStatus.REMOVED == rule.getStatus()) {
        throw new IllegalArgumentException("Rule with REMOVED status cannot be updated: " + change.getRuleKey());
      }
      return rule;
    }
  }
402678
@Override
	public void optionsUpdated(IOptions options, long sequence) {
		Context cx = Context.enter();
		try {
			Scriptable jsOptions = cx.newObject(sharedScope);
			Map<String, String> optionsMap = options.getOptionsMap();
			for (Map.Entry<String, String> entry : optionsMap.entrySet()) {
				Object value = Context.javaToJS(entry.getValue(), sharedScope);
				ScriptableObject.putProperty(jsOptions, entry.getKey(), value);
			}
			ScriptableObject.putProperty(sharedScope, "options", jsOptions); //$NON-NLS-1$
		} finally {
			Context.exit();
		}
	}
540212
private void sequenceCommand(long sequence, ServerSessionContext session, CompletableFuture<Result> future, ThreadContext context) {
    if (!log.isOpen()) {
      context.executor().execute(() -> future.completeExceptionally(new IllegalStateException("log closed")));
      return;
    }

    Result result = session.getResult(sequence);
    if (result == null) {
      LOGGER.debug("Missing command result for {}:{}", session.id(), sequence);
    }
    context.executor().execute(() -> future.complete(result));
  }
990028
def sequence(cls, *info):
		
		if len(info) == 0:
			return

		info = list(info)
		info.reverse()

		result = WMessengerOnionSessionFlowProto.Iterator(
			info[0].layer_name(), **info[0].layer_args()
		)

		for i in range(1, len(info)):
			result = WMessengerOnionSessionFlowProto.Iterator(
				info[i].layer_name(), next_iterator=result, **info[i].layer_args()
			)

		return result
175331
def setCurrentRule( self, rule ):
        
        curr_rule = self.currentRule()
        if ( curr_rule == rule ):
            return
        
        self._currentRule = rule
        
        curr_op     = self.uiOperatorDDL.currentText()
        self.uiOperatorDDL.blockSignals(True)
        self.uiOperatorDDL.clear()
        if ( rule ):
            self.uiOperatorDDL.addItems(rule.operators())
            index = self.uiOperatorDDL.findText(curr_op)
            if ( index != -1 ):
                self.uiOperatorDDL.setCurrentIndex(index)
                
        self.uiOperatorDDL.blockSignals(False)
        
        self.updateEditor()
236688
public boolean update(DbSession dbSession, RuleUpdate update, OrganizationDto organization, UserSession userSession) {
    if (update.isEmpty()) {
      return false;
    }

    RuleDto rule = getRuleDto(update);
    // validate only the changes, not all the rule fields
    apply(update, rule, userSession);
    update(dbSession, rule);
    updateParameters(dbSession, organization, update, rule);
    ruleIndexer.commitAndIndex(dbSession, rule.getId(), organization);

    return true;
  }
1067135
def update_lbaas_l7rule(self, l7rule, l7policy, body=None):
        """"""
        return self.put(self.lbaas_l7rule_path % (l7policy, l7rule),
                        body=body)
427840
def use_active_sequence_rule_view(self):
        """"""
        self._operable_views['sequence_rule'] = ACTIVE
        # self._get_provider_session('sequence_rule_lookup_session')  # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_active_sequence_rule_view()
            except AttributeError:
                pass
700091
protected void updateNotify (long sequence) {

		IServiceReference[] refs = null;
		try {
			if(aggregator != null && aggregator.getPlatformServices() != null){
				refs = aggregator.getPlatformServices().getServiceReferences(IOptionsListener.class.getName(),"(name=" + registrationName + ")");	//$NON-NLS-1$ //$NON-NLS-2$
				if (refs != null) {
					for (IServiceReference ref : refs) {
						IOptionsListener listener = (IOptionsListener)aggregator.getPlatformServices().getService(ref);
						if (listener != null) {
							try {
								listener.optionsUpdated(this, sequence);
							} catch (Throwable ignore) {
							} finally {
								aggregator.getPlatformServices().ungetService(ref);
							}
						}
					}
				}
			}
		} catch (PlatformServicesException e) {
			if (log.isLoggable(Level.SEVERE)) {
				log.log(Level.SEVERE, e.getMessage(), e);
			}
		}
	}
49586
def applyRule( self ):
        
        widget = self.queryBuilderWidget()
        if ( not widget ):
            return
        
        rule = widget.findRule(self.uiTermDDL.currentText())
        self.setCurrentRule(rule)