當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。