public ContextManagementService getContextManagementService() { return servicesContext.getContextManagementService(); }
private ContextManager checkedGetContextManager(String deploymentId, String contextName) { ContextManager contextManager = services.getContextManagementService().getContextManager(deploymentId, contextName); if (contextManager == null) { throw new IllegalArgumentException("Context by name '" + contextName + "' could not be found for deployment-id '" + deploymentId + "'"); } return contextManager; } }
public void removeContextStateListeners() { services.getContextManagementService().getListeners().clear(); }
public void removeContextStateListener(ContextStateListener listener) { services.getContextManagementService().getListeners().remove(listener); }
public void addContextStateListener(ContextStateListener listener) { services.getContextManagementService().getListeners().add(listener); }
public void activateContext(String name, ContextDefinition definition) { // we are checking that all is resolved ContextMetaData detail = moduleIncidentals.getContexts().get(name); if (detail == null) { throw new IllegalArgumentException("Failed to find context information for '" + name + "'"); } servicesContext.getContextManagementService().addContext(definition, this); }
public Iterator<ContextStateListener> getContextStateListeners() { return services.getContextManagementService().getListeners().iterator(); }
private EPFireAndForgetQueryResult executeInternal(ContextPartitionSelector[] contextPartitionSelectors) { try { FAFQueryMethodAssignerSetter setter = queryMethodProvider.getSubstitutionFieldSetter(); EPPreparedQueryResult result = queryMethod.execute(serviceStatusProvider, setter, contextPartitionSelectors, epServicesContext.getContextManagementService()); return new EPQueryResultImpl(result); } catch (Throwable t) { throw new EPException(t.getMessage(), t); } }
public static int getContextCount(RegressionEnvironment env) { EPRuntimeSPI spi = (EPRuntimeSPI) env.runtime(); return spi.getServicesContext().getContextManagementService().getContextCount(); } }
public void destroy(StatementDestroyServices destroyServices, StatementContext statementContext) { services.getContextManagementService().stoppedStatement(contextDeploymentId, contextName, statement); statementAgentInstanceFactory.statementDestroy(lightweight.getStatementContext()); } };
private EPFireAndForgetQueryResult executeQueryPrepared(EPFireAndForgetPreparedQueryParameterized parameterizedQuery, ContextPartitionSelector[] selectors) { EPFireAndForgetPreparedQueryParameterizedImpl impl = (EPFireAndForgetPreparedQueryParameterizedImpl) parameterizedQuery; EPRuntimeHelperFAF.checkSubstitutionSatisfied(impl); if (!impl.getServiceProviderStatus().get()) { throw FAFQueryMethodUtil.runtimeDestroyed(); } if (impl.getServiceProviderStatus() != serviceStatusProvider) { throw new EPException("Service provider has already been destroyed and reallocated"); } return new EPQueryResultImpl(impl.getQueryMethod().execute(serviceStatusProvider, impl.getFields(), selectors, services.getContextManagementService())); }
private EPFireAndForgetQueryResult executeQueryUnprepared(EPCompiled compiled, ContextPartitionSelector[] contextPartitionSelectors) { FAFProvider fafProvider = EPRuntimeHelperFAF.queryMethod(compiled, services); FAFQueryMethodProvider queryMethodProvider = fafProvider.getQueryMethodProvider(); EPRuntimeHelperFAF.validateSubstitutionParams(queryMethodProvider); FAFQueryMethod queryMethod = queryMethodProvider.getQueryMethod(); queryMethod.ready(); EPPreparedQueryResult result = queryMethod.execute(serviceStatusProvider, queryMethodProvider.getSubstitutionFieldSetter(), contextPartitionSelectors, services.getContextManagementService()); return new EPQueryResultImpl(result); } }
ContextManager contextManager = services.getContextManagementService().getContextManager(contextDeploymentId, contextPartitionName); if (contextManager == null) { throw new VariableNotFoundException("Context by name '" + contextPartitionName + "' cannot be found");
if (optionalContextName != null) { String contextDeploymentId = ContextDeployTimeResolver.resolveContextDeploymentId(informationals.getOptionalContextModuleName(), informationals.getOptionalContextVisibility(), optionalContextName, deploymentId, services.getContextPathRegistry()); ContextManager contextManager = services.getContextManagementService().getContextManager(contextDeploymentId, optionalContextName); contextRuntimeDescriptor = contextManager.getContextRuntimeDescriptor(); AIRegistryRequirements registryRequirements = statementProvider.getStatementAIFactoryProvider().getFactory().getRegistryRequirements();
services.getContextManagementService().addStatement(contextDeploymentId, contextName, statement, recovery); statementDestroyCallback = new StatementDestroyCallback() { public void destroy(StatementDestroyServices destroyServices, StatementContext statementContext) {