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); }
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); }