Example #1
0
        //internal Account(int number, int signalnum, int threadnum,int appendnum,bool cassandra=true)
        //{
        //    Random ran = new Random();
        //   value = new List<double>(number);
        //    for (int i = 0; i < number; i++)
        //    {
        //        value.Add( ran.NextDouble());
        //    }

        //    datanum = number;
        //    this.threadnum = threadnum;
        //    this.appendnum = appendnum;
        //    this.signalnum = signalnum;
        //    this.signalcount = signalnum / threadnum;

        //    myCoreService = CoreService.GetInstance();
        //    myCoreService.Init("JDBC-test");
        //    if (cassandra)
        //    {
        //        storageEngine = new CassandraEngine();
        //        storageEngine.Init("host =115.156.252.12 & database = demo");
        //    //    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"
        //    }
        //    else
        //    {
        //        storageEngine = new MongoEngine();
        //        storageEngine.Init("host =mongodb://127.0.0.1:27017 & database = JDBC-test & collection = Payload");
        //    }
        //    myCoreService.myStorageEngine = storageEngine;
        //}
        internal Account(int number, int signalnum, int threadnum, int appendnum, bool cassandra = true)
        {
            Random ran = new Random();

            value = new List <double>(number);
            for (int i = 0; i < number; i++)
            {
                value.Add(ran.NextDouble());
            }

            datanum          = number;
            this.threadnum   = threadnum;
            this.appendnum   = appendnum;
            this.signalnum   = signalnum;
            this.signalcount = signalnum / threadnum;

            //    myCoreService = CoreService.GetInstance();

            if (cassandra)
            {
                storageEngine = new CassandraEngine();
                storageEngine.Init("host =115.156.252.12 & database = demo1");
                //    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"
            }
            else
            {
                storageEngine = new MongoEngine();
                storageEngine.Init("host =mongodb://127.0.0.1:27017 & database = JDBC-test & collection = Payload");
            }
            myCoreService.Init("mongodb://127.0.0.1:27017", "JDBC-test", "Experiment", storageEngine);
        }
Example #2
0
 public FixedWaveDataTypePlugin(CoreService coreService)
 {
     myCoreService   = coreService;
     myStorageEngine = coreService.StorageEngine as IMatrixStorageEngineInterface;
     if (myStorageEngine == null)
     {
         throw new Exception(ErrorMessages.NotValidStorageEngine);
     }
     DataProcesserDictionary = new ConcurrentDictionary <Guid, IDataProcesser>();
 }
Example #3
0
 public WaveDataProcesser(CoreService coreService, string dataType, string name)
 {
     myCoreService   = coreService;
     myStorageEngine = coreService.StorageEngine as IMatrixStorageEngineInterface;
     if (myStorageEngine == null)
     {
         throw new Exception(ErrorMessages.NotValidStorageEngine);
     }
     DataType = dataType;
     Name     = name;
 }