コード例 #1
0
ファイル: Magnesium.cs プロジェクト: KureFM/Magnesium
 public void MagnesiumInit()
 {
     _dcpManager = new DcpManager();
     _requestQueueOptions = new ExecutionDataflowBlockOptions();
     _storeQueue = new ActionBlock<DataContainer>(dc => _dcpManager.StoreHandler(dc));
     _parseQueue = new ActionBlock<DataResponse>(dresp => _dcpManager.ParseHandler(dresp, _storeQueue));
     _requestQueue = new ActionBlock<DataRequest>(dr => _dcpManager.RequestHandler(dr, _parseQueue), _requestQueueOptions);
     //布隆过滤器, 大小10M, 容错率0.001
     _bloomFilter = new BloomFilter<string>(10000000, 0.001f);
 }
コード例 #2
0
ファイル: Magnesium.cs プロジェクト: lanicon/Magnesium
 public void MagnesiumInit()
 {
     _dcpManager          = new DcpManager();
     _requestQueueOptions = new ExecutionDataflowBlockOptions();
     _storeQueue          = new ActionBlock <DataContainer>(dc => _dcpManager.StoreHandler(dc));
     _parseQueue          = new ActionBlock <DataResponse>(dresp => _dcpManager.ParseHandler(dresp, _storeQueue));
     _requestQueue        = new ActionBlock <DataRequest>(dr => _dcpManager.RequestHandler(dr, _parseQueue), _requestQueueOptions);
     //布隆过滤器, 大小10M, 容错率0.001
     _bloomFilter = new BloomFilter <string>(10000000, 0.001f);
 }