
io.siddhi.core.config.SiddhiAppContext Maven / Gradle / Ivy
/*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package io.siddhi.core.config;
import com.lmax.disruptor.ExceptionHandler;
import io.siddhi.core.function.Script;
import io.siddhi.core.trigger.Trigger;
import io.siddhi.core.util.IdGenerator;
import io.siddhi.core.util.Scheduler;
import io.siddhi.core.util.SiddhiConstants;
import io.siddhi.core.util.ThreadBarrier;
import io.siddhi.core.util.extension.holder.ExternalReferencedHolder;
import io.siddhi.core.util.snapshot.SnapshotService;
import io.siddhi.core.util.snapshot.state.EmptyStateHolder;
import io.siddhi.core.util.snapshot.state.SingleStateHolder;
import io.siddhi.core.util.snapshot.state.SingleSyncStateHolder;
import io.siddhi.core.util.snapshot.state.StateFactory;
import io.siddhi.core.util.snapshot.state.StateHolder;
import io.siddhi.core.util.statistics.StatisticsManager;
import io.siddhi.core.util.statistics.metrics.Level;
import io.siddhi.core.util.timestamp.TimestampGenerator;
import io.siddhi.query.api.SiddhiApp;
import java.beans.ExceptionListener;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;
/**
* Holder object for context information of {@link SiddhiApp}.
*/
public class SiddhiAppContext {
private static final ThreadLocal GROUP_BY_KEY = new ThreadLocal<>();
private static final ThreadLocal PARTITION_KEY = new ThreadLocal<>();
private SiddhiContext siddhiContext = null;
private String name;
private boolean playback;
private boolean enforceOrder;
private Level rootMetricsLevel;
private StatisticsManager statisticsManager = null;
private ExecutorService executorService;
private ScheduledExecutorService scheduledExecutorService;
private List externalReferencedHolders;
private List triggerHolders;
private SnapshotService snapshotService;
private ThreadBarrier threadBarrier = null;
private TimestampGenerator timestampGenerator = null;
private IdGenerator idGenerator;
private Map scriptFunctionMap;
private ExceptionHandler
© 2015 - 2025 Weber Informatics LLC | Privacy Policy