示例#1
0
        public ReplicaStatusTable(LightningPersistence lmdb, string tableName, string replicaId)
        {
            _lmdb      = lmdb;
            _replicaId = replicaId;
            _table     = _lmdb.OpenTable(tableName);

            _clockKey    = new TableKey(KEY_CLOCK);
            _countersKey = new TableKey(KEY_COUNTERS);
        }
示例#2
0
        public void TestCreateTable()
        {
            using (var persistence = new LightningPersistence(_config))
            {
                using (var table = persistence.OpenTable("testtable"))
                {
                }
            }

            Assert.Pass();
        }
示例#3
0
 public KvTable(LightningPersistence lmdb, string kvTableName, string replicaId,
                ReplicaStatusTable statusTable, ExpiryTable expiryTable, KvMetadataTable metadataTable, WriteLogTable wlTable,
                Func <VectorClock> currentClock, Func <WriteTransaction, VectorClock> incrementClock, Func <Item[], Task> updateNotifier)
 {
     _lmdb           = lmdb;
     _replicaId      = replicaId;
     StatusTable     = statusTable;
     _kvTable        = _lmdb.OpenTable(kvTableName);
     _expiryTable    = expiryTable;
     _metadataTable  = metadataTable;
     _wlTable        = wlTable;
     _currentClock   = currentClock;
     _incrementClock = incrementClock;
     _updateNotifier = updateNotifier;
 }
示例#4
0
        public ReplicationTable(LightningPersistence lmdb, string tableName)
        {
            _lmdb = lmdb;
//            _replicaId = replicaId;
            _table = _lmdb.OpenTable(tableName);
        }
示例#5
0
 public WriteLogTable(LightningPersistence lmdb, string tableName, string replicaId)
 {
     _lmdb      = lmdb;
     _replicaId = replicaId;
     _table     = _lmdb.OpenTable(tableName);
 }
示例#6
0
 public KvMetadataTable(LightningPersistence lmdb, string tableName)
 {
     _lmdb  = lmdb;
     _table = _lmdb.OpenTable(tableName);
 }
示例#7
0
 public LmdbLightClient(LightningConfig config)
 {
     _lmdb    = new LightningPersistence(config);
     _kvTable = _lmdb.OpenTable("kv");
 }