Package org.graylog2.cluster
Class NodeServiceImpl
java.lang.Object
org.graylog2.database.PersistedServiceImpl
org.graylog2.cluster.NodeServiceImpl
- All Implemented Interfaces:
NodeService
,PersistedService
-
Field Summary
Fields inherited from class org.graylog2.database.PersistedServiceImpl
mongoConnection
-
Constructor Summary
ConstructorDescriptionNodeServiceImpl
(MongoConnection mongoConnection, Configuration configuration) -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
isOnlyLeader
(NodeId nodeId) void
markAsAlive
(Node node, boolean isLeader, String restTransportAddress) Mark this node as alive and probably update some settings that may have changed since last server boot.void
markAsAlive
(Node node, boolean isLeader, URI restTransportAddress) registerServer
(String nodeId, boolean isLeader, URI httpPublishUri, String hostname) Methods inherited from class org.graylog2.database.PersistedServiceImpl
collection, collection, count, count, cursorToList, destroy, destroy, destroyAll, destroyAll, destroyAll, embed, findOne, findOne, findOne, findOne, get, get, get, query, query, query, query, query, removeEmbedded, removeEmbedded, save, saveWithoutValidation, 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
destroy, destroyAll, save, saveWithoutValidation, validate, validate, validate
-
Constructor Details
-
NodeServiceImpl
-
-
Method Details
-
registerServer
- Specified by:
registerServer
in interfaceNodeService
-
byNodeId
- Specified by:
byNodeId
in interfaceNodeService
- Throws:
NodeNotFoundException
-
byNodeId
- Specified by:
byNodeId
in interfaceNodeService
- Throws:
NodeNotFoundException
-
allActive
- Specified by:
allActive
in interfaceNodeService
-
allActive
- Specified by:
allActive
in interfaceNodeService
-
dropOutdated
public void dropOutdated()- Specified by:
dropOutdated
in interfaceNodeService
-
markAsAlive
Mark this node as alive and probably update some settings that may have changed since last server boot.- Specified by:
markAsAlive
in interfaceNodeService
-
markAsAlive
- Specified by:
markAsAlive
in interfaceNodeService
-
isOnlyLeader
- Specified by:
isOnlyLeader
in interfaceNodeService
-
isAnyLeaderPresent
public boolean isAnyLeaderPresent()- Specified by:
isAnyLeaderPresent
in interfaceNodeService
-