示例#1
0
        protected override IndexWriter GetIndex(QueueModel state)
        {
            if (null == state)
            {
                return(null);
            }

            int areaID = state.AreaID;

            IndexConfig config = null;

            if (!areaHash.ContainsKey(areaID) && null == areaHash[areaID])
            {
                config           = new IndexConfig();
                config.IndexPath = IndexConfiguration.GetAreaPath(areaID);

                areaHash[areaID] = config;
            }
            else
            {
                config = areaHash[areaID] as IndexConfig;
            }

            return(config?.Writer);
        }
 private MallProductIndexManager()
 {
     _config           = new IndexConfig();
     _config.IndexPath = IndexConfiguration.GetMallProductPath();
 }
 private JobIndexManager()
 {
     _config           = new IndexConfig();
     _config.IndexPath = IndexConfiguration.GetJobPath();
 }
示例#4
0
 private MerchantIndexManager()
 {
     _config           = new IndexConfig();
     _config.IndexPath = IndexConfiguration.GetMerchantPath();
 }