Exemplo n.º 1
0
		public void SetUpTest()
		{
			m_db = new KeyValueDatabase(filename => new DatabaseFileReader(filename), filename=> new DatabaseFileWriter(filename),
				filename => new MemoryCacheProvider(filename));
			
			m_db.Start();
		}
Exemplo n.º 2
0
        public void SetUpTest()
        {
            m_db = new KeyValueDatabase(filename => new DatabaseFileReader(filename), filename=> new DatabaseFileWriter(filename),
                filename => new MemoryCacheProvider(filename));

            m_db.Start();
        }
Exemplo n.º 3
0
 public void Restart()
 {
     Database.Stop();
     Database = new KeyValueDatabase(filename => new DatabaseFileReader(filename), filename => new DatabaseFileWriter(filename),
                                                                         filename => new MemoryCacheProvider(filename));
     Database.FileName = SpecsDbFile;
     Database.Start();
 }
Exemplo n.º 4
0
 public void Restart()
 {
     Database.Stop();
     Database = new KeyValueDatabase(filename => new DatabaseFileReader(filename), filename => new DatabaseFileWriter(filename),
                                     filename => new MemoryCacheProvider(filename));
     Database.FileName = SpecsDbFile;
     Database.Start();
 }
Exemplo n.º 5
0
        public DatabaseContext()
        {
            File.Delete(SpecsDbFile);

            Database = new KeyValueDatabase(filename => new DatabaseFileReader(filename), filename => new DatabaseFileWriter(filename),
                                              filename => new MemoryCacheProvider(filename));
            Database.FileName = SpecsDbFile;
            Database.Start();
        }
Exemplo n.º 6
0
        public DatabaseContext()
        {
            File.Delete(SpecsDbFile);

            Database = new KeyValueDatabase(filename => new DatabaseFileReader(filename), filename => new DatabaseFileWriter(filename),
                                            filename => new MemoryCacheProvider(filename));
            Database.FileName = SpecsDbFile;
            Database.Start();
        }
Exemplo n.º 7
0
        public void Start()
        {
            m_log = LogManager.GetLogger(this.GetType());

            m_log.InfoFormat("Starting SharpDB...");
            m_log.InfoFormat("Database Name: {0}", m_name);

            m_db = new KeyValueDatabase(filename => new DatabaseFileReader(filename), filename => new DatabaseFileWriter(filename),
                                        filename => new MemoryCacheProvider(filename));
            m_db.FileName = m_name + ".sdb";
            m_db.Start();

            m_context = NetMQContext.Create();

            m_server = new Network.Server(m_context, m_db, string.Format("tcp://*:{0}", m_port));

            m_task = Task.Factory.StartNew(m_server.Start);
        }
Exemplo n.º 8
0
        public bool Start(HostControl hostControl)
#endif
        {
            m_log = LogManager.GetLogger(this.GetType());

            m_log.InfoFormat("Starting SharpDB...");
            m_log.InfoFormat("Database Name: {0}", m_name);

            m_db = new KeyValueDatabase(filename => new DatabaseFileReader(filename), filename => new DatabaseFileWriter(filename),
                                        filename => new MemoryCacheProvider(filename));
            m_db.FileName = m_name + ".sdb";
            m_db.Start();

            m_server = new Network.Server(m_db, string.Format("tcp://*:{0}", m_port));

            m_task = Task.Factory.StartNew(m_server.Start);
            return(true);
        }