ContextDetailPartitioned segmented = (ContextDetailPartitioned) contextDesc.getContextDetail();
contextManager = new ContextManagerPartitioned(contextDesc.getContextName(), servicesContext, segmented, agentInstanceContext, stateService);
}
else if (contextDesc.getContextDetail() instanceof ContextDetailTemporalFixed) {
ContextDetailTemporalFixed temporal = (ContextDetailTemporalFixed) contextDesc.getContextDetail();
ScheduleSpec crontabStart = ExprNodeUtility.toCrontabSchedule(temporal.getCrontabStart(), agentInstanceContext.getStatementContext());
ScheduleSpec crontabEnd = ExprNodeUtility.toCrontabSchedule(temporal.getCrontabEnd(), agentInstanceContext.getStatementContext());
contextManager = new ContextManagerTemporalSingle(contextDesc.getContextName(), servicesContext, agentInstanceContext.getStatementContext(), crontabStart, crontabEnd);
}
else if (contextDesc.getContextDetail() instanceof ContextDetailCategory) {
ContextDetailCategory category = (ContextDetailCategory) contextDesc.getContextDetail();
contextManager = new ContextManagerCategorized(contextDesc.getContextName(), servicesContext, category);