Exemple #1
0
        public MongoLogArchiveStore(LogReceiverService director, LogArchiveDimensionsMapper mapper, IConfigSectionNode node) : base(director, mapper, node)
        {
            var cstring = ConfigStringBuilder.Build(node, CONFIG_MONGO_SECTION);

            m_Database               = MongoClient.DatabaseFromConnectString(cstring);
            m_DefaultChannel         = node.AttrByName(CONFIG_DEFAULT_CHANNEL_ATTR).ValueAsString(DEFAULT_CHANNEL);
            m_Serializer             = new BSONSerializer(node);
            m_Serializer.PKFieldName = Query._ID;
        }
Exemple #2
0
        protected override void DoConfigure(IConfigSectionNode node)
        {
            base.DoConfigure(node);

            LogArchiveDimensionsMapper mapper = null;

            DisposeAndNull(ref m_ArchiveStore);

            var mapperNode = node[CONFIG_ARCHIVE_MAPPER_SECTION];

            mapper = FactoryUtils.Make <LogArchiveDimensionsMapper>(mapperNode, defaultType: typeof(LogArchiveDimensionsMapper), args: new object[] { this, mapperNode });

            var storeNode = node[CONFIG_ARCHIVE_STORE_SECTION];

            if (storeNode.Exists)
            {
                m_ArchiveStore = FactoryUtils.Make <LogArchiveStore>(storeNode, args: new object[] { this, mapper, storeNode });
            }
        }
Exemple #3
0
 protected LogArchiveStore(LogReceiverService director, LogArchiveDimensionsMapper mapper, IConfigSectionNode node) : base(director)
 {
     ConfigAttribute.Apply(this, node);
     m_Mapper = mapper;
 }