public static void BasicSetup(TestContext context) { var myStorageEngine = new CassandraIndexEngine(); //CassandraIndexEngine();//CassandraEngine(); myStorageEngine.Init("host =127.0.0.1 & database = jdbc_unittest"); //127.0.0.1 myCoreApi = CoreApi.GetInstance(); myCoreApi.CoreService.Init("mongodb://127.0.0.1:27017", "JDBC-test", "Experiment", (IStorageEngine)myStorageEngine); }
public static void BasicSetup(TestContext context) { var myStorageEngine = new CassandraIndexEngine(); //CassandraIndexEngine();//CassandraEngine(); myStorageEngine.Init("host =localhost & database = jdbc_unittest"); //127.0.0.1 myCoreApi = CoreApi.GetInstance(); //JDBC-test jdbc_liuweb myCoreApi.CoreService.Init("mongodb://127.0.0.1:27017", "jdbc_liuweb", "Experiment", (IStorageEngine)myStorageEngine); myCoreApi.CoreService.RegisterClassMap <FixedIntervalWaveSignal>(); }
public void initial() { var myStorageEngine = new CassandraIndexEngine(); //CassandraIndexEngine();//CassandraEngine(); myStorageEngine.Init("host =192.168.137.153 & database = jdbc_unittest"); //127.0.0.1 myCoreApi = CoreApi.GetInstance(); myCoreApi.CoreService.Init("mongodb://127.0.0.1:27017", "JDBC-test", "Experiment", (IStorageEngine)myStorageEngine); myCoreApi.CoreService.RegisterClassMap <FixedIntervalWaveSignal>(); var fixedWaveDataTypePlugin = new FixedWaveDataTypePlugin(myCoreApi.CoreService); myCoreApi.AddDataTypePlugin(fixedWaveDataTypePlugin); }
public void Setup() { // Debug.Write(1); storageEngine.Init("host =127.0.0.1 & database = jdbc_indextest"); myCoreService.StorageEngine = storageEngine; // storageEngine.Init("host =115.156.252.12 & database = jdbc_unittest"); //storageEngine.Init("host =127.0.0.1 & database = jdbc_unittest"); //"host =127.0.0.1 & database = jdbc_unittest "//"host =mongodb://127.0.0.1:27017 & database = JDBC-test & collection = Payload" //myCoreService.myStorageEngine = storageEngine; // myCoreService.Init("JDBC-test", (IStorageEngine)myStorageEngine); // Debug.Write(1); }
public static void BasicSetup(TestContext context) { //实例化StorageEngine,初始化 var myStorageEngine = new CassandraIndexEngine();//CassandraIndexEngine();//CassandraEngine(); myStorageEngine.Init("host =127.0.0.1 & database = jdbc_unittest"); //实例化CoreService和CoreApi myCoreApi = CoreApi.GetInstance(); myCoreApi.CoreService.Init("mongodb://127.0.0.1:27017", "JDBC-test", "Experiment", (IStorageEngine)myStorageEngine); //实例化DataTypePlugin,注入StorageEngine、CoreService,将其添加到CoreApi var fixedWaveDataTypePlugin = new FixedWaveDataTypePlugin(myCoreApi.CoreService); myCoreApi.AddDataTypePlugin(fixedWaveDataTypePlugin); }
/// <summary> /// config the business logic /// </summary> public static void ConfigBusiness() { //从config文件加载数据库连接字符串 mongoHost = ConfigurationManager.AppSettings["MongoHost"]; mongoDatabase = ConfigurationManager.AppSettings["MongoDatabase"]; mongoCollection = ConfigurationManager.AppSettings["MongoCollection"]; cassandraInit = ConfigurationManager.ConnectionStrings["CassandraDB"].ConnectionString; //初始化StorageEngine var cassandraStorageEngine = new CassandraIndexEngine();//CassandraEngine cassandraStorageEngine.Init(cassandraInit); //初始化CoreApi MyCoreApi = CoreApi.GetInstance(); MyCoreApi.CoreService.Init(mongoHost, mongoDatabase, mongoCollection, (IStorageEngine)cassandraStorageEngine); //添加QueryPlugIn var pathQueryPlugIn = new PathQueryPlugIn(MyCoreApi.CoreService); MyCoreApi.AddQueryPlugin(pathQueryPlugIn); var idQueryPlugin = new IDQueryPlugIn(MyCoreApi.CoreService); MyCoreApi.AddQueryPlugin(idQueryPlugin); //添加DataTypePlugin var fixedWaveDataTypePlugin = new FixedWaveDataTypePlugin(MyCoreApi.CoreService); MyCoreApi.AddDataTypePlugin(fixedWaveDataTypePlugin); //添加ExpressionPlugin var expressionPlugin = new ExpressionPlugin(MyCoreApi.CoreService); MyCoreApi.AddDataTypePlugin(expressionPlugin); //将继承类在MongoDB中进行注册 MyCoreApi.CoreService.RegisterClassMap <FixedIntervalWaveSignal>(); //MyCoreApi.MyCoreService.RegisterClassMap<IntFixedIntervalWaveSignal>(); //MyCoreApi.MyCoreService.RegisterClassMap<DoubleFixedIntervalWaveSignal>(); //创建DTO映射 ConfigDtoMapping(); SetExpressionRoot(); }