Esempio n. 1
0
 public void deactivateContextPartitions(Set<Integer> agentInstanceIds) {
   for (Integer agentInstanceId : agentInstanceIds) {
     ContextControllerTreeAgentInstanceList list = agentInstances.get(agentInstanceId);
     StatementAgentInstanceUtil.stopAgentInstances(
         list.getAgentInstances(), null, servicesContext, false);
   }
 }
Esempio n. 2
0
 public synchronized void contextPartitionTerminate(
     ContextControllerInstanceHandle contextNestedHandle,
     Map<String, Object> terminationProperties) {
   ContextNestedHandleImpl handle = (ContextNestedHandleImpl) contextNestedHandle;
   ContextControllerTreeAgentInstanceList entry =
       agentInstances.remove(handle.getContextPartitionOrPathId());
   if (entry != null) {
     StatementAgentInstanceUtil.stopAgentInstances(
         entry.getAgentInstances(), terminationProperties, servicesContext, false);
     entry.getAgentInstances().clear();
     contextPartitionIdManager.removeId(contextNestedHandle.getContextPartitionOrPathId());
   }
 }
Esempio n. 3
0
  public void safeDestroy() {
    if (rootContext != null) {
      // deactivate
      rootContext.deactivate();
      factory.getStateCache().removeContext(contextName);

      for (Map.Entry<Integer, ContextControllerTreeAgentInstanceList> entryCP :
          agentInstances.entrySet()) {
        StatementAgentInstanceUtil.stopAgentInstances(
            entryCP.getValue().getAgentInstances(), null, servicesContext, true);
      }
      agentInstances.clear();
      contextPartitionIdManager.clear();
      statements.clear();
    }
  }