|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.samskivert.depot.DepotRepository
com.threerings.presents.peer.server.persist.NodeRepository
public class NodeRepository
Used to share information on active nodes in a Presents server cluster.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.samskivert.depot.DepotRepository |
|---|
DepotRepository.CacheStrategy |
| Field Summary |
|---|
| Fields inherited from class com.samskivert.depot.DepotRepository |
|---|
_ctx, _dataMigs |
| Constructor Summary | |
|---|---|
NodeRepository(PersistenceContext ctx)
Constructs a new repository with the specified persistence context. |
|
| Method Summary | |
|---|---|
protected void |
getManagedRecords(Set<Class<? extends PersistentRecord>> classes)
|
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. |
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. |
| Methods inherited from class com.samskivert.depot.DepotRepository |
|---|
delete, delete, deleteAll, deleteAll, deleteAll, deleteAll, doUpdate, findAll, findAll, findAll, findAll, findAllKeys, findAllKeys, from, init, insert, load, load, load, load, loadAll, loadAll, makeValue, map, registerMigration, requireNotComputed, resolveRecords, runMigration, store, update, update, updatePartial, updatePartial, updatePartial, updatePartial, updatePartial |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Inject public NodeRepository(PersistenceContext ctx)
| Method Detail |
|---|
public List<NodeRecord> loadNodes()
public List<NodeRecord> loadNodes(String namespace)
public List<NodeRecord> loadNodes(String namespace,
boolean includeShutdown)
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)
protected void getManagedRecords(Set<Class<? extends PersistentRecord>> classes)
getManagedRecords in class DepotRepository
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||