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
ConstructorDescriptionInputServiceImpl
(MongoConnection mongoConnection, ExtractorFactory extractorFactory, ConverterFactory converterFactory, MessageInputFactory messageInputFactory, ClusterEventBus clusterEventBus, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtractor
(Input input, Extractor extractor) void
addStaticField
(Input input, String key, String value) all()
allOfThisNode
(String nodeId) <T extends Persisted>
intdestroy
(T model) protected void
fieldTransformations
(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) long
long
long
localCountForNode
(String nodeId) void
removeExtractor
(Input input, String extractorId) void
removeStaticField
(Input input, String key) save
(T model) saveWithoutEvents
(T model) saveWithoutValidation
(T model) long
long
totalCountForNode
(String nodeId) long
void
updateExtractor
(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, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.graylog2.plugin.database.PersistedService
destroyAll, validate, validate, validate
-
Constructor Details
-
Method Details
-
all
- Specified by:
all
in interfaceInputService
-
allOfThisNode
- Specified by:
allOfThisNode
in interfaceInputService
-
allByType
- Specified by:
allByType
in interfaceInputService
-
findByIds
- Specified by:
findByIds
in interfaceInputService
-
save
- Specified by:
save
in interfacePersistedService
- Overrides:
save
in classPersistedServiceImpl
- Throws:
ValidationException
-
saveWithoutEvents
- Specified by:
saveWithoutEvents
in interfaceInputService
- Throws:
ValidationException
-
update
- Specified by:
update
in interfaceInputService
- Throws:
ValidationException
-
saveWithoutValidation
- Specified by:
saveWithoutValidation
in interfacePersistedService
- Overrides:
saveWithoutValidation
in classPersistedServiceImpl
-
destroy
- Specified by:
destroy
in interfacePersistedService
- Overrides:
destroy
in classPersistedServiceImpl
-
create
- Specified by:
create
in interfaceInputService
-
create
- Specified by:
create
in interfaceInputService
-
find
- Specified by:
find
in interfaceInputService
- Throws:
NotFoundException
-
findForThisNodeOrGlobal
- Specified by:
findForThisNodeOrGlobal
in interfaceInputService
- Throws:
NotFoundException
-
findForThisNode
public Input findForThisNode(String nodeId, String id) throws NotFoundException, IllegalArgumentException - Specified by:
findForThisNode
in interfaceInputService
- Throws:
NotFoundException
IllegalArgumentException
-
addExtractor
- Specified by:
addExtractor
in interfaceInputService
- Throws:
ValidationException
-
updateExtractor
- Specified by:
updateExtractor
in interfaceInputService
- Throws:
ValidationException
-
addStaticField
- Specified by:
addStaticField
in interfaceInputService
- Throws:
ValidationException
-
getStaticFields
- Specified by:
getStaticFields
in interfaceInputService
-
getExtractors
- Specified by:
getExtractors
in interfaceInputService
-
getExtractor
- Specified by:
getExtractor
in interfaceInputService
- Throws:
NotFoundException
-
removeExtractor
- Specified by:
removeExtractor
in interfaceInputService
-
removeStaticField
- Specified by:
removeStaticField
in interfaceInputService
-
getMessageInput
- Specified by:
getMessageInput
in interfaceInputService
- Throws:
NoSuchInputTypeException
-
totalCount
public long totalCount()- Specified by:
totalCount
in interfaceInputService
- Returns:
- the total number of inputs in the cluster (including global inputs).
-
globalCount
public long globalCount()- Specified by:
globalCount
in interfaceInputService
- Returns:
- the number of global inputs in the cluster.
-
localCount
public long localCount()- Specified by:
localCount
in interfaceInputService
- Returns:
- the number of node-specific inputs in the cluster.
-
totalCountByType
- Specified by:
totalCountByType
in interfaceInputService
- Returns:
- the total number of inputs in the cluster grouped by type.
-
localCountForNode
- Specified by:
localCountForNode
in interfaceInputService
- Parameters:
nodeId
- the node ID to query- Returns:
- the number of inputs on the specified node
-
totalCountForNode
- Specified by:
totalCountForNode
in 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:
totalExtractorCount
in interfaceInputService
- Returns:
- the total number of extractors in the cluster (including global inputs).
-
totalExtractorCountByType
- Specified by:
totalExtractorCountByType
in interfaceInputService
- Returns:
- the total number of extractors in the cluster (including global inputs) grouped by type.
-
fieldTransformations
- Overrides:
fieldTransformations
in classPersistedServiceImpl
-