Package org.graylog2.cluster
Class NodeServiceImpl
java.lang.Object
org.graylog2.database.PersistedServiceImpl
org.graylog2.cluster.NodeServiceImpl
- All Implemented Interfaces:
NodeService,PersistedService
-
Field Summary
FieldsFields inherited from class org.graylog2.database.PersistedServiceImpl
mongoConnection -
Constructor Summary
ConstructorsConstructorDescriptionNodeServiceImpl(MongoConnection mongoConnection, int staleLeaderTimeout) NodeServiceImpl(MongoConnection mongoConnection, Configuration configuration) -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.voidbooleanbooleanisOnlyLeader(NodeId nodeId) voidmarkAsAlive(NodeId node, boolean isLeader, URI restTransportAddress) Mark this node as alive and probably update some settings that may have changed since last server boot.booleanregisterServer(String nodeId, boolean isLeader, URI httpPublishUri, String hostname) type()Methods 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
-
Field Details
-
LAST_SEEN_FIELD
- See Also:
-
-
Constructor Details
-
NodeServiceImpl
-
NodeServiceImpl
-
-
Method Details
-
type
- Specified by:
typein interfaceNodeService
-
registerServer
- Specified by:
registerServerin interfaceNodeService
-
byNodeId
- Specified by:
byNodeIdin interfaceNodeService- Throws:
NodeNotFoundException
-
byNodeId
- Specified by:
byNodeIdin interfaceNodeService- Throws:
NodeNotFoundException
-
allActive
- Specified by:
allActivein interfaceNodeService
-
allActive
Deprecated.Description copied from interface:NodeServicePlease use theNodeService.allActive(Node.Type)method and provide explicit type of the node. Otherwise, the implementation will fall back toNodeService.type()and provide only nodes of this type.- Specified by:
allActivein interfaceNodeService
-
dropOutdated
public void dropOutdated()- Specified by:
dropOutdatedin interfaceNodeService
-
markAsAlive
public void markAsAlive(NodeId node, boolean isLeader, URI restTransportAddress) throws NodeNotFoundException Mark this node as alive and probably update some settings that may have changed since last server boot.- Specified by:
markAsAlivein interfaceNodeService- Throws:
NodeNotFoundException
-
isOnlyLeader
- Specified by:
isOnlyLeaderin interfaceNodeService
-
isAnyLeaderPresent
public boolean isAnyLeaderPresent()- Specified by:
isAnyLeaderPresentin interfaceNodeService
-