Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
The Cloud Services Integration Platform is a SoA implementation to offer a Model-as-a-Service framework, Application Programming Interface, deployment infrastructure, and service implementations for environmental modeling.
/*
* $Id: Config.java c4b9d8c126c7 2020-07-28 [email protected] $
*
* This file is part of the Cloud Services Integration Platform (CSIP),
* a Model-as-a-Service framework, API and application suite.
*
* 2012-2019, Olaf David and others, OMSLab, Colorado State University.
*
* OMSLab licenses this file to you under the MIT license.
* See the LICENSE file in the project root for more information.
*/
package csip;
import csip.ModelDataService.Task;
import csip.utils.Binaries;
import csip.utils.SimpleCache;
import java.io.File;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Global properties, adjustable at runtime.
*
* @author od
*/
public class Config {
private static final Properties p = new Properties();
private static final Properties allProps = new Properties();
private static final List tasks = Collections.synchronizedList(new ArrayList());
//
static private SimpleCache backends = new SimpleCache<>();
//
private static ExecutorService exec;
private static Timer timer;
private static final Registry reg = new Registry();
static final Logger LOG = Logger.getLogger("csip-core");
private static final Object timerLock = new Object();
/**
* CSIP API version. Set by the system.
*/
public static final String CSIP_PLATFORM_VERSION = "csip.platform.version";
public static final String CSIP_CONTEXT_VERSION = "csip.context.version";
/**
* CSIP platform Architecture. Set by the system.
* e.g.: lin-amd46, win-x86,...
*/
public static final String CSIP_ARCH = "csip.arch";
/**
* Remote Access ACL. list of IPs or subnets that are allows to connect via
* UI. This ACL is not for the services, just service management.
* default: "127.0.0.1/32" (localhost only)
*/
public static final String CSIP_REMOTE_ACL = "csip.remote.acl";
public static final String CSIP_TIMEZONE = "csip.timezone";
public static final String CSIP_LOGGING_LEVEL = "csip.logging.level";
public static final String CSIP_RESPONSE_STACKTRACE = "csip.response.stacktrace";
public static final String CSIP_RESPONSE_SQLFILTER = "csip.response.sqlfilter";
public static final String CSIP_RESPONSE_JSONINDENT = "csip.response.jsonindent";
public static final String CSIP_RESPONSE_ERROR_HTTPSTATUS = "csip.response.error.httpstatus";
public static final String CSIP_PAYLOAD_VERSION = "csip.payload.version";
//
public static final String CSIP_SESSION_BACKEND = "csip.session.backend";
public static final String CSIP_SESSION_TTL = "csip.session.ttl";
public static final String CSIP_SESSION_MONGODB_URI = "csip.session.mongodb.uri";
public static final String CSIP_SESSION_TTL_FAILED = "csip.session.ttl.failed";
public static final String CSIP_SESSION_TTL_CANCELLED = "csip.session.ttl.cancelled";
public static final String CSIP_ARCHIVE_BACKEND = "csip.archive.backend";
public static final String CSIP_ARCHIVE_MONGODB_URI = "csip.archive.mongodb.uri";
public static final String CSIP_ARCHIVE_MAX_FILE_SIZE = "csip.archive.max.filesize";
public static final String CSIP_ARCHIVE_TTL = "csip.archive.ttl";
public static final String CSIP_ARCHIVE_FAILEDONLY = "csip.archive.failedonly";
public static final String CSIP_RESULTSTORE_BACKEND = "csip.resultstore.backend";
public static final String CSIP_RESULTSTORE_MONGODB_URI = "csip.resultstore.mongodb.uri";
public static final String CSIP_RESULTSTORE_LIMIT = "csip.resultstore.limit";
//
public static final String CSIP_DIR = "csip.dir";
public static final String CSIP_BIN_DIR = "csip.bin.dir";
public static final String CSIP_WORK_DIR = "csip.work.dir";
public static final String CSIP_RESULTS_DIR = "csip.results.dir";
public static final String CSIP_CACHE_DIR = "csip.cache.dir";
public static final String CSIP_DATA_DIR = "csip.data.dir";
//
public static final String CSIP_SNAPSHOT = "csip.snapshot";
public static final String CSIP_KEEPWORKSPACE = "csip.keepworkspace";
public static final String CSIP_JDBC_CHECKVALID = "csip.jdbc.checkvalid";
// values for session/archive/result
public static final String MONGODB = "mongodb";
public static final String LOCAL = "local";
public static final String SQL = "sql";
public static final String NONE = "none";
public static final String KAFKA = "kafka";
// publisher
public static final String CSIP_PUBLISHER_BACKEND = "csip.publisher.backend";
public static final String CSIP_PUBLISHER_KAFKA_BOOTSTRAP_SERVERS = "csip.publisher.kafka.bootstrap_servers";
public static final String CSIP_PUBLISHER_KAFKA_ACKS = "csip.publisher.kafka.acks";
public static final String CSIP_PUBLISHER_KAFKA_TOPIC = "csip.publisher.kafka.topic";
public static final String CSIP_PUBLISHER_KAFKA_RETRIES = "csip.publisher.kafka.retries.";
public static final String CSIP_PUBLISHER_KAFKA_MAX_BLOCK_MS = "csip.publisher.kafka.max_block_ms.";
// Auth
public static final String CSIP_TOKEN_AUTHENTICATION = "csip.token.authentication";
// internal services
static final String CSIP_PUBSUB_ENABLED = "csip.pubsub.enabled";
static final String CSIP_DYNPY_ENABLED = "csip.dynpy.enabled";
public static Map