コード例 #1
0
 public IndexStoreLoop(ConcurrentChain chain,
                       IndexRepository indexRepository,
                       NodeSettings nodeArgs,
                       ChainState chainState,
                       IndexBlockPuller blockPuller,
                       IndexStoreCache cache,
                       INodeLifetime nodeLifetime,
                       IAsyncLoopFactory asyncLoopFactory,
                       ILoggerFactory loggerFactory) :
     base(asyncLoopFactory, blockPuller, indexRepository, cache, chain, chainState, nodeArgs, nodeLifetime, loggerFactory, "IndexStore")
 {
     nodeArgs.Store.TxIndex = true;
 }
コード例 #2
0
        public Index(IndexRepository repository, string name, bool multiValue, string builder, string[] dependencies = null)
            : base(multiValue, builder, dependencies)
        {
            this.repository = repository;
            this.session    = repository.GetSession();
            this.Name       = name;
            this.Table      = repository.IndexTableName(name);

            try
            {
                this.Compile();
            }
            catch (Exception e)
            {
                throw new IndexStoreException("Could not compile index '" + name + "': " + e.Message);
            }
        }
コード例 #3
0
        public static Index Parse(IndexRepository repository, string json, string table = null)
        {
            var index = new Index(repository);

            JsonConvert.PopulateObject(json, index);
            if (table != null)
            {
                index.Table = table;
            }

            try
            {
                index.Compile();
            }
            catch (Exception e)
            {
                throw new IndexStoreException("Could not compile index '" + index.Name + "': " + e.Message);
            }

            return(index);
        }
コード例 #4
0
 public IndexStoreManager(ConcurrentChain chain, IConnectionManager connection, IndexRepository indexRepository,
                          IDateTimeProvider dateTimeProvider, NodeSettings nodeArgs, ChainState chainState, IndexStoreLoop indexStoreLoop) :
     base(chain, connection, indexRepository, dateTimeProvider, nodeArgs, chainState, indexStoreLoop)
 {
 }
コード例 #5
0
 public IndexStoreCache(IndexRepository indexRepository) : this(indexRepository, new MemoryCache(new MemoryCacheOptions()))
 {
 }
コード例 #6
0
 public IndexStoreFeature(ConcurrentChain chain, IConnectionManager connectionManager, Signals.Signals signals, IndexRepository indexRepository,
                          IndexStoreCache indexStoreCache, IndexBlockPuller blockPuller, IndexStoreLoop indexStoreLoop, IndexStoreManager indexStoreManager,
                          IndexStoreSignaled indexStoreSignaled, INodeLifetime nodeLifetime, NodeSettings nodeSettings, ILoggerFactory loggerFactory) :
     base(chain, connectionManager, signals, indexRepository, indexStoreCache, blockPuller, indexStoreLoop, indexStoreManager,
          indexStoreSignaled, nodeLifetime, nodeSettings, loggerFactory, "IndexStore")
 {
 }
コード例 #7
0
 public Index(IndexRepository repository)
     : base(false, null)
 {
     this.repository = repository;
     this.session    = repository.GetSession();
 }
コード例 #8
0
 public IndexStoreBehavior(ConcurrentChain chain, IndexRepository blockRepository, IndexStoreCache blockStoreCache, ILoggerFactory loggerFactory) :
     this(chain, blockRepository as IIndexRepository, blockStoreCache as IIndexStoreCache, loggerFactory)
 {
 }
コード例 #9
0
 public IndexStoreCache(IndexRepository indexRepository, ILoggerFactory loggerFactory) : this(indexRepository, new MemoryCache(new MemoryCacheOptions()), loggerFactory)
 {
 }
コード例 #10
0
 public Index(IndexRepository repository)
     : base(false, null)
 {
     this.repository = repository;
     this.dbreeze    = repository.GetDbreezeEngine();
 }