public StateHolder generateStateHolder(String name, StateFactory stateFactory, boolean unSafe) {
        if (stateFactory != null) {
            StateHolder stateHolder;
            if (unSafe) {
                stateHolder = new SingleStateHolder(stateFactory);
            } else {
                stateHolder = new SingleSyncStateHolder(stateFactory);
            }
            if (SnapshotService.getSkipStateStorageThreadLocal().get() == null ||
                    !SnapshotService.getSkipStateStorageThreadLocal().get()) {
                Map<String, StateHolder> stateHolderMap = getSnapshotService().getStateHolderMap(
                        SiddhiConstants.PARTITION_ID_DEFAULT, SiddhiConstants.PARTITION_ID_DEFAULT);
                stateHolderMap.put(name + "-" + idGenerator.createNewId(), stateHolder);
            }
            return stateHolder;
        } else {
            return new EmptyStateHolder();
        }
    }
Attributes that are common across all the Siddhi Apps

@return Attribute Map&lt;String, Object&gt;
modules/siddhi-core/src/main/java/io/siddhi/core/config/SiddhiAppContext.java