public class NodeRepository extends DepotRepository
DepotRepository.CacheStrategy| Constructor and Description |
|---|
NodeRepository(PersistenceContext ctx)
Constructs a new repository with the specified persistence context.
|
| Modifier and Type | Method and Description |
|---|---|
void |
heartbeatNode(String nodeName)
Updates
NodeRecord.lastUpdated for the specified node, indicating that the node is
alive and well. |
List<NodeRecord> |
loadNodes()
Returns a list of all nodes registered in the repository that are not explicitly shut down.
|
List<NodeRecord> |
loadNodes(String namespace)
Returns a list of all nodes registered in the repository with names starting with the given
string that are not explicitly shut down.
|
List<NodeRecord> |
loadNodes(String namespace,
boolean includeShutdown)
Returns a list of all nodes registered in the repository with names starting with the given
string, optionally including nodes that are explicitly shut down.
|
List<NodeRecord> |
loadNodesFromRegion(String region)
Returns a list of nodes registered in the repository with the specified region that are not
explicitly shut down.
|
void |
shutdownNode(String nodeName)
Marks the identified node as shut down in its record.
|
void |
updateNode(NodeRecord record)
Updates the supplied node record, inserting it into the database if necessary.
|
ctx, delete, delete, deleteAll, deleteAll, deleteAll, deleteAll, findAll, findAll, findAll, findAll, findAllKeys, findAllKeys, from, insert, load, load, load, load, loadAll, loadAll, registerMigration, store, update, update, update, updatePartial, updatePartial, updatePartial, updatePartial, updatePartial@Inject public NodeRepository(PersistenceContext ctx)
public List<NodeRecord> loadNodes()
public List<NodeRecord> loadNodes(String namespace)
public List<NodeRecord> loadNodes(String namespace, boolean includeShutdown)
public List<NodeRecord> loadNodesFromRegion(String region)
public void updateNode(NodeRecord record)
public void heartbeatNode(String nodeName)
NodeRecord.lastUpdated for the specified node, indicating that the node is
alive and well.public void shutdownNode(String nodeName)
Copyright © 2015. All rights reserved.