Package org.graylog2.streams
Class StreamServiceImpl
java.lang.Object
org.graylog2.database.PersistedServiceImpl
org.graylog2.streams.StreamServiceImpl
- All Implemented Interfaces:
PersistedService,StreamService
-
Field Summary
Fields inherited from class org.graylog2.database.PersistedServiceImpl
mongoConnection -
Constructor Summary
ConstructorsConstructorDescriptionStreamServiceImpl(MongoConnection mongoConnection, StreamRuleService streamRuleService, OutputService outputService, IndexSetService indexSetService, MongoIndexSet.Factory indexSetFactory, NotificationService notificationService, EntityOwnershipService entityOwnershipService, ClusterEventBus clusterEventBus) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddOutputs(org.bson.types.ObjectId streamId, Collection<org.bson.types.ObjectId> outputIds) voidaddToIndexSet(String indexSetId, Collection<String> streamIds) longcount()create(CreateStreamRequest cr, String userId) voidindexSetIdsByIds(Collection<String> streamIds) load(org.bson.types.ObjectId id) loadAll()loadAllEnabled(Map<String, Object> additionalQueryOpts) loadAllWithIndexSet(String indexSetId) loadByIds(Collection<String> streamIds) loadOutputsForRawStream(com.mongodb.DBObject stream) voidvoidremoveOutput(Stream stream, Output output) voidremoveOutputFromAllStreams(Output output) voidsaveWithRulesAndOwnership(Stream stream, Collection<StreamRule> streamRules, User user) voidMethods inherited from class org.graylog2.database.PersistedServiceImpl
collection, collection, count, count, cursorToList, destroy, destroy, destroyAll, destroyAll, destroyAll, embed, fieldTransformations, findOne, findOne, findOne, findOne, get, get, get, query, query, query, query, query, removeEmbedded, removeEmbedded, save, saveWithoutValidation, totalCount, totalCount, validate, validate, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.graylog2.plugin.database.PersistedService
destroy, destroyAll, save, saveWithoutValidation, validate, validate, validate
-
Constructor Details
-
StreamServiceImpl
@Inject public StreamServiceImpl(MongoConnection mongoConnection, StreamRuleService streamRuleService, OutputService outputService, IndexSetService indexSetService, MongoIndexSet.Factory indexSetFactory, NotificationService notificationService, EntityOwnershipService entityOwnershipService, ClusterEventBus clusterEventBus)
-
-
Method Details
-
load
- Throws:
NotFoundException
-
create
- Specified by:
createin interfaceStreamService
-
create
- Specified by:
createin interfaceStreamService
-
load
- Specified by:
loadin interfaceStreamService- Throws:
NotFoundException
-
loadAllEnabled
- Specified by:
loadAllEnabledin interfaceStreamService
-
loadAllEnabled
-
loadAll
- Specified by:
loadAllin interfaceStreamService
-
loadAll
-
loadByIds
- Specified by:
loadByIdsin interfaceStreamService
-
indexSetIdsByIds
- Specified by:
indexSetIdsByIdsin interfaceStreamService
-
loadOutputsForRawStream
-
count
public long count()- Specified by:
countin interfaceStreamService- Returns:
- the total number of streams
-
destroy
- Specified by:
destroyin interfaceStreamService- Throws:
NotFoundException
-
update
public void update(Stream stream, @Nullable String title, @Nullable String description) throws ValidationException - Throws:
ValidationException
-
pause
- Specified by:
pausein interfaceStreamService- Throws:
ValidationException
-
resume
- Specified by:
resumein interfaceStreamService- Throws:
ValidationException
-
addOutput
- Specified by:
addOutputin interfaceStreamService
-
addOutputs
public void addOutputs(org.bson.types.ObjectId streamId, Collection<org.bson.types.ObjectId> outputIds) - Specified by:
addOutputsin interfaceStreamService
-
removeOutput
- Specified by:
removeOutputin interfaceStreamService
-
removeOutputFromAllStreams
- Specified by:
removeOutputFromAllStreamsin interfaceStreamService
-
loadAllWithIndexSet
- Specified by:
loadAllWithIndexSetin interfaceStreamService
-
addToIndexSet
- Specified by:
addToIndexSetin interfaceStreamService
-
save
- Specified by:
savein interfaceStreamService- Throws:
ValidationException
-
saveWithRulesAndOwnership
public String saveWithRulesAndOwnership(Stream stream, Collection<StreamRule> streamRules, User user) throws ValidationException - Specified by:
saveWithRulesAndOwnershipin interfaceStreamService- Throws:
ValidationException
-