public class NodeServiceImpl extends PersistedServiceImpl implements NodeService
mongoConnection| Constructor and Description |
|---|
NodeServiceImpl(MongoConnection mongoConnection,
Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Node> |
allActive() |
Map<String,Node> |
allActive(Node.Type type) |
Node |
byNodeId(NodeId nodeId) |
Node |
byNodeId(String nodeId) |
void |
dropOutdated() |
boolean |
isAnyLeaderPresent() |
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) |
String |
registerServer(String nodeId,
boolean isLeader,
URI httpPublishUri,
String hostname) |
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, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, destroyAll, save, saveWithoutValidation, validate, validate, validate@Inject public NodeServiceImpl(MongoConnection mongoConnection, Configuration configuration)
public String registerServer(String nodeId, boolean isLeader, URI httpPublishUri, String hostname)
registerServer in interface NodeServicepublic Node byNodeId(String nodeId) throws NodeNotFoundException
byNodeId in interface NodeServiceNodeNotFoundExceptionpublic Node byNodeId(NodeId nodeId) throws NodeNotFoundException
byNodeId in interface NodeServiceNodeNotFoundExceptionpublic Map<String,Node> allActive(Node.Type type)
allActive in interface NodeServicepublic Map<String,Node> allActive()
allActive in interface NodeServicepublic void dropOutdated()
dropOutdated in interface NodeServicepublic void markAsAlive(Node node, boolean isLeader, String restTransportAddress)
markAsAlive in interface NodeServicepublic void markAsAlive(Node node, boolean isLeader, URI restTransportAddress)
markAsAlive in interface NodeServicepublic boolean isOnlyLeader(NodeId nodeId)
isOnlyLeader in interface NodeServicepublic boolean isAnyLeaderPresent()
isAnyLeaderPresent in interface NodeServiceCopyright © 2012–2022 Graylog, Inc.. All rights reserved.