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 |
isAnyMasterPresent() |
boolean |
isOnlyMaster(NodeId nodeId) |
void |
markAsAlive(Node node,
boolean isMaster,
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 isMaster,
URI restTransportAddress) |
String |
registerRadio(String nodeId,
String restTransportUri) |
String |
registerServer(String nodeId,
boolean isMaster,
URI restTransportUri) |
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 isMaster, URI restTransportUri)
registerServer in interface NodeServicepublic String registerRadio(String nodeId, String restTransportUri)
registerRadio 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 isMaster, String restTransportAddress)
markAsAlive in interface NodeServiceisMaster - restTransportAddress - public void markAsAlive(Node node, boolean isMaster, URI restTransportAddress)
markAsAlive in interface NodeServicepublic boolean isOnlyMaster(NodeId nodeId)
isOnlyMaster in interface NodeServicepublic boolean isAnyMasterPresent()
isAnyMasterPresent in interface NodeServiceCopyright © 2012–2014 TORCH GmbH. All rights reserved.