Package org.graylog2.inputs
Class InputServiceImpl
java.lang.Object
org.graylog2.database.PersistedServiceImpl
org.graylog2.inputs.InputServiceImpl
- All Implemented Interfaces:
InputService,PersistedService
-
Field Summary
Fields inherited from class org.graylog2.database.PersistedServiceImpl
mongoConnection -
Constructor Summary
ConstructorsConstructorDescriptionInputServiceImpl(MongoConnection mongoConnection, ExtractorFactory extractorFactory, ConverterFactory converterFactory, MessageInputFactory messageInputFactory, ClusterEventBus clusterEventBus, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtractor(Input input, Extractor extractor) voidaddStaticField(Input input, String key, String value) all()allOfThisNode(String nodeId) <T extends Persisted>
intdestroy(T model) protected voidfieldTransformations(Map<String, Object> doc) findByIds(Collection<String> ids) findForThisNode(String nodeId, String id) findForThisNodeOrGlobal(String nodeId, String id) getExtractor(Input input, String extractorId) getExtractors(Input input) getMessageInput(Input io) getStaticFields(Input input) longlonglonglocalCountForNode(String nodeId) voidremoveExtractor(Input input, String extractorId) voidremoveStaticField(Input input, String key) save(T model) saveWithoutEvents(T model) saveWithoutValidation(T model) longlongtotalCountForNode(String nodeId) longvoidupdateExtractor(Input input, Extractor extractor) Methods inherited from class org.graylog2.database.PersistedServiceImpl
collection, collection, count, count, cursorToList, destroy, destroyAll, destroyAll, destroyAll, embed, findOne, findOne, findOne, findOne, get, get, get, query, query, query, query, query, removeEmbedded, removeEmbedded, 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
destroyAll, validate, validate, validate
-
Constructor Details
-
Method Details
-
all
- Specified by:
allin interfaceInputService
-
allOfThisNode
- Specified by:
allOfThisNodein interfaceInputService
-
allByType
- Specified by:
allByTypein interfaceInputService
-
findByIds
- Specified by:
findByIdsin interfaceInputService
-
save
- Specified by:
savein interfacePersistedService- Overrides:
savein classPersistedServiceImpl- Throws:
ValidationException
-
saveWithoutEvents
- Specified by:
saveWithoutEventsin interfaceInputService- Throws:
ValidationException
-
update
- Specified by:
updatein interfaceInputService- Throws:
ValidationException
-
saveWithoutValidation
- Specified by:
saveWithoutValidationin interfacePersistedService- Overrides:
saveWithoutValidationin classPersistedServiceImpl
-
destroy
- Specified by:
destroyin interfacePersistedService- Overrides:
destroyin classPersistedServiceImpl
-
create
- Specified by:
createin interfaceInputService
-
create
- Specified by:
createin interfaceInputService
-
find
- Specified by:
findin interfaceInputService- Throws:
NotFoundException
-
findForThisNodeOrGlobal
- Specified by:
findForThisNodeOrGlobalin interfaceInputService- Throws:
NotFoundException
-
findForThisNode
public Input findForThisNode(String nodeId, String id) throws NotFoundException, IllegalArgumentException - Specified by:
findForThisNodein interfaceInputService- Throws:
NotFoundExceptionIllegalArgumentException
-
addExtractor
- Specified by:
addExtractorin interfaceInputService- Throws:
ValidationException
-
updateExtractor
- Specified by:
updateExtractorin interfaceInputService- Throws:
ValidationException
-
addStaticField
- Specified by:
addStaticFieldin interfaceInputService- Throws:
ValidationException
-
getStaticFields
- Specified by:
getStaticFieldsin interfaceInputService
-
getExtractors
- Specified by:
getExtractorsin interfaceInputService
-
getExtractor
- Specified by:
getExtractorin interfaceInputService- Throws:
NotFoundException
-
removeExtractor
- Specified by:
removeExtractorin interfaceInputService
-
removeStaticField
- Specified by:
removeStaticFieldin interfaceInputService
-
getMessageInput
- Specified by:
getMessageInputin interfaceInputService- Throws:
NoSuchInputTypeException
-
totalCount
public long totalCount()- Specified by:
totalCountin interfaceInputService- Returns:
- the total number of inputs in the cluster (including global inputs).
-
globalCount
public long globalCount()- Specified by:
globalCountin interfaceInputService- Returns:
- the number of global inputs in the cluster.
-
localCount
public long localCount()- Specified by:
localCountin interfaceInputService- Returns:
- the number of node-specific inputs in the cluster.
-
totalCountByType
- Specified by:
totalCountByTypein interfaceInputService- Returns:
- the total number of inputs in the cluster grouped by type.
-
localCountForNode
- Specified by:
localCountForNodein interfaceInputService- Parameters:
nodeId- the node ID to query- Returns:
- the number of inputs on the specified node
-
totalCountForNode
- Specified by:
totalCountForNodein interfaceInputService- Parameters:
nodeId- the node ID to query- Returns:
- the number of inputs on the specified node (including global inputs)
-
totalExtractorCount
public long totalExtractorCount()- Specified by:
totalExtractorCountin interfaceInputService- Returns:
- the total number of extractors in the cluster (including global inputs).
-
totalExtractorCountByType
- Specified by:
totalExtractorCountByTypein interfaceInputService- Returns:
- the total number of extractors in the cluster (including global inputs) grouped by type.
-
fieldTransformations
- Overrides:
fieldTransformationsin classPersistedServiceImpl
-