Package org.graylog2.streams
Class StreamRuleServiceImpl
java.lang.Object
org.graylog2.database.PersistedServiceImpl
org.graylog2.streams.StreamRuleServiceImpl
- All Implemented Interfaces:
PersistedService,StreamRuleService
-
Field Summary
Fields inherited from class org.graylog2.database.PersistedServiceImpl
mongoConnection -
Constructor Summary
ConstructorsConstructorDescriptionStreamRuleServiceImpl(MongoConnection mongoConnection, ClusterEventBus clusterEventBus) -
Method Summary
Modifier and TypeMethodDescriptioncopy(String streamId, StreamRule streamRule) create(String streamId, CreateStreamRuleRequest cr) intdestroy(StreamRule streamRule) loadForStream(Stream stream) loadForStreamId(String streamId) loadForStreamIds(Collection<String> streamIds) save(Collection<StreamRule> streamRules) save(StreamRule streamRule) longstreamRuleCount(String streamId) longMethods 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
-
StreamRuleServiceImpl
@Inject public StreamRuleServiceImpl(MongoConnection mongoConnection, ClusterEventBus clusterEventBus)
-
-
Method Details
-
load
- Specified by:
loadin interfaceStreamRuleService- Throws:
NotFoundException
-
loadForStream
- Specified by:
loadForStreamin interfaceStreamRuleService
-
create
- Specified by:
createin interfaceStreamRuleService
-
create
- Specified by:
createin interfaceStreamRuleService
-
copy
- Specified by:
copyin interfaceStreamRuleService
-
save
- Specified by:
savein interfaceStreamRuleService- Throws:
ValidationException
-
save
- Specified by:
savein interfaceStreamRuleService- Throws:
ValidationException
-
destroy
- Specified by:
destroyin interfaceStreamRuleService
-
loadForStreamId
- Specified by:
loadForStreamIdin interfaceStreamRuleService
-
loadForStreamIds
- Specified by:
loadForStreamIdsin interfaceStreamRuleService
-
totalStreamRuleCount
public long totalStreamRuleCount()- Specified by:
totalStreamRuleCountin interfaceStreamRuleService- Returns:
- the total number of stream rules
-
streamRuleCount
- Specified by:
streamRuleCountin interfaceStreamRuleService- Parameters:
streamId- the stream ID- Returns:
- the number of stream rules for the specified stream
-
streamRuleCountByStream
- Specified by:
streamRuleCountByStreamin interfaceStreamRuleService- Returns:
- the number of stream rules grouped by stream
-