本文整理汇总了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));
}
示例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));
}
示例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());
}
示例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());
}
示例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;
}
示例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));
}
示例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);
}