use of io.siddhi.core.trigger.Trigger in project siddhi by wso2.
the class SiddhiAppRuntimeImpl method startWithoutSources.
public synchronized void startWithoutSources() {
if (running || runningWithoutSources) {
log.warn("Error calling startWithoutSources() for Siddhi App '" + siddhiAppContext.getName() + "', " + "SiddhiApp already started.");
} else {
try {
memoryUsageTracker.disableMemoryUsageMetrics();
if (siddhiAppContext.getRootMetricsLevel().compareTo(Level.OFF) != 0 && siddhiAppContext.getStatisticsManager() != null) {
if (siddhiAppContext.getRootMetricsLevel().compareTo(Level.DETAIL) == 0) {
memoryUsageTracker.enableMemoryUsageMetrics();
}
siddhiAppContext.getStatisticsManager().startReporting();
}
for (ExternalReferencedHolder externalReferencedHolder : siddhiAppContext.getExternalReferencedHolders()) {
externalReferencedHolder.start();
}
for (List<Sink> sinks : sinkMap.values()) {
for (Sink sink : sinks) {
sink.connectWithRetry();
}
}
for (Table table : tableMap.values()) {
table.connectWithRetry();
}
for (StreamJunction streamJunction : streamJunctionMap.values()) {
streamJunction.startProcessing();
}
if (incrementalDataPurging) {
for (AggregationRuntime aggregationRuntime : aggregationMap.values()) {
aggregationRuntime.startPurging();
}
}
for (Trigger trigger : siddhiAppContext.getTriggerHolders()) {
trigger.start();
}
inputManager.connect();
runningWithoutSources = true;
} catch (Throwable t) {
log.error("Error starting Siddhi App '" + siddhiAppContext.getName() + "', " + "triggering shutdown process. " + t.getMessage());
try {
shutdown();
} catch (Throwable t1) {
log.error("Error shutting down partially started Siddhi App '" + siddhiAppContext.getName() + "', " + t1.getMessage());
}
}
}
}
Aggregations