当前位置: 首页>>代码示例>>Java>>正文


Java MongoJackObjectMapperProvider类代码示例

本文整理汇总了Java中org.graylog2.bindings.providers.MongoJackObjectMapperProvider的典型用法代码示例。如果您正苦于以下问题:Java MongoJackObjectMapperProvider类的具体用法?Java MongoJackObjectMapperProvider怎么用?Java MongoJackObjectMapperProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MongoJackObjectMapperProvider类属于org.graylog2.bindings.providers包,在下文中一共展示了MongoJackObjectMapperProvider类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MongoDbRuleService

import org.graylog2.bindings.providers.MongoJackObjectMapperProvider; //导入依赖的package包/类
@Inject
public MongoDbRuleService(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper) {
    dbCollection = JacksonDBCollection.wrap(
            mongoConnection.getDatabase().getCollection(COLLECTION),
            RuleDao.class,
            String.class,
            mapper.get());
    dbCollection.createIndex(DBSort.asc("title"), new BasicDBObject("unique", true));
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-pipeline-processor,代码行数:10,代码来源:MongoDbRuleService.java

示例2: MongoDbPipelineStreamConnectionsService

import org.graylog2.bindings.providers.MongoJackObjectMapperProvider; //导入依赖的package包/类
@Inject
public MongoDbPipelineStreamConnectionsService(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper) {
    dbCollection = JacksonDBCollection.wrap(
            mongoConnection.getDatabase().getCollection(COLLECTION),
            PipelineConnections.class,
            String.class,
            mapper.get());
    dbCollection.createIndex(DBSort.asc("stream_id"), new BasicDBObject("unique", true));
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-pipeline-processor,代码行数:10,代码来源:MongoDbPipelineStreamConnectionsService.java

示例3: MongoDbPipelineService

import org.graylog2.bindings.providers.MongoJackObjectMapperProvider; //导入依赖的package包/类
@Inject
public MongoDbPipelineService(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper) {
    dbCollection = JacksonDBCollection.wrap(
            mongoConnection.getDatabase().getCollection(COLLECTION),
            PipelineDao.class,
            String.class,
            mapper.get());
    dbCollection.createIndex(DBSort.asc("title"), new BasicDBObject("unique", true));
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-pipeline-processor,代码行数:10,代码来源:MongoDbPipelineService.java

示例4: CollectorConfigurationService

import org.graylog2.bindings.providers.MongoJackObjectMapperProvider; //导入依赖的package包/类
@Inject
public CollectorConfigurationService(MongoConnection mongoConnection,
                                     MongoJackObjectMapperProvider mapper) {
    dbCollection = JacksonDBCollection.wrap(
            mongoConnection.getDatabase().getCollection(COLLECTION_NAME),
            CollectorConfiguration.class,
            ObjectId.class,
            mapper.get());
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-collector,代码行数:10,代码来源:CollectorConfigurationService.java

示例5: CollectorServiceImpl

import org.graylog2.bindings.providers.MongoJackObjectMapperProvider; //导入依赖的package包/类
@Inject
public CollectorServiceImpl(MongoConnection mongoConnection,
                            MongoJackObjectMapperProvider mapperProvider,
                            Validator validator) {
    this.validator = validator;
    final String collectionName = CollectorImpl.class.getAnnotation(CollectionName.class).value();
    final DBCollection dbCollection = mongoConnection.getDatabase().getCollection(collectionName);
    this.coll = JacksonDBCollection.wrap(dbCollection, CollectorImpl.class, String.class, mapperProvider.get());
    this.coll.createIndex(new BasicDBObject("id", 1), new BasicDBObject("unique", true));

    final String actionCollectionName = CollectorActions.class.getAnnotation(CollectionName.class).value();
    final DBCollection actionDbCollection = mongoConnection.getDatabase().getCollection(actionCollectionName);
    this.collActions = JacksonDBCollection.wrap(actionDbCollection, CollectorActions.class, String.class, mapperProvider.get());

}
 
开发者ID:Graylog2,项目名称:graylog-plugin-collector,代码行数:16,代码来源:CollectorServiceImpl.java

示例6: RuleServiceImpl

import org.graylog2.bindings.providers.MongoJackObjectMapperProvider; //导入依赖的package包/类
@Inject
public RuleServiceImpl(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapperProvider,
                          Validator validator, StreamService streamService, AlertConditionFactory alertConditionFactory,
                          HistoryItemService historyItemService) {
	this.validator = validator;
	final String collectionName = RuleImpl.class.getAnnotation(CollectionName.class).value();
	final DBCollection dbCollection = mongoConnection.getDatabase().getCollection(collectionName);
	this.coll = JacksonDBCollection.wrap(dbCollection, RuleImpl.class, String.class, mapperProvider.get());
	this.coll.createIndex(new BasicDBObject("name", 1), new BasicDBObject("unique", true));
	this.streamService = streamService;
	this.alertConditionFactory = alertConditionFactory;
	this.historyItemService = historyItemService;
}
 
开发者ID:cvtienhoven,项目名称:graylog-plugin-aggregates,代码行数:14,代码来源:RuleServiceImpl.java

示例7: HistoryItemServiceImpl

import org.graylog2.bindings.providers.MongoJackObjectMapperProvider; //导入依赖的package包/类
@Inject
public HistoryItemServiceImpl(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapperProvider,
		Validator validator) {
	this.validator = validator;
	final String collectionName = HistoryItemImpl.class.getAnnotation(CollectionName.class).value();
	final DBCollection dbCollection = mongoConnection.getDatabase().getCollection(collectionName);
	this.coll = JacksonDBCollection.wrap(dbCollection, HistoryItemImpl.class, String.class, mapperProvider.get());
	// this.coll.createIndex(new BasicDBObject("name", 1), new
	// BasicDBObject("unique", true));
}
 
开发者ID:cvtienhoven,项目名称:graylog-plugin-aggregates,代码行数:11,代码来源:HistoryItemServiceImpl.java

示例8: setUp

import org.graylog2.bindings.providers.MongoJackObjectMapperProvider; //导入依赖的package包/类
@Before
public void setUp(MongoJackObjectMapperProvider mapperProvider,
                  Validator validator) throws Exception {
    this.collectorService = new CollectorServiceImpl(mongoRule.getMongoConnection(), mapperProvider, validator);
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-collector,代码行数:6,代码来源:CollectorServiceImplTest.java


注:本文中的org.graylog2.bindings.providers.MongoJackObjectMapperProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。