Search in sources :

Example 1 with IndexSetCreatedEvent

use of org.graylog2.indexer.indexset.events.IndexSetCreatedEvent in project graylog2-server by Graylog2.

the class MongoIndexSetService method save.

/**
     * {@inheritDoc}
     */
@Override
public IndexSetConfig save(IndexSetConfig indexSetConfig) {
    final WriteResult<IndexSetConfig, ObjectId> writeResult = collection.save(indexSetConfig);
    final IndexSetConfig savedObject = writeResult.getSavedObject();
    final IndexSetCreatedEvent createdEvent = IndexSetCreatedEvent.create(savedObject);
    clusterEventBus.post(createdEvent);
    return savedObject;
}
Also used : IndexSetCreatedEvent(org.graylog2.indexer.indexset.events.IndexSetCreatedEvent) ObjectId(org.bson.types.ObjectId)

Aggregations

ObjectId (org.bson.types.ObjectId)1 IndexSetCreatedEvent (org.graylog2.indexer.indexset.events.IndexSetCreatedEvent)1