Publish our server startup time in our NodeObject.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5867 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2009-07-13 00:34:19 +00:00
parent 646b438404
commit 9cdd93ee11
2 changed files with 23 additions and 0 deletions
@@ -38,6 +38,9 @@ public class NodeObject extends DObject
/** The field name of the <code>nodeName</code> field. */
public static final String NODE_NAME = "nodeName";
/** The field name of the <code>bootStamp</code> field. */
public static final String BOOT_STAMP = "bootStamp";
/** The field name of the <code>peerService</code> field. */
public static final String PEER_SERVICE = "peerService";
@@ -130,6 +133,9 @@ public class NodeObject extends DObject
/** The node name of this peer. */
public String nodeName;
/** The time that this node's JVM started up. */
public long bootStamp;
/** The service used to make requests of the node. */
public PeerMarshaller peerService;
@@ -165,6 +171,22 @@ public class NodeObject extends DObject
this.nodeName = value;
}
/**
* Requests that the <code>bootStamp</code> field be set to the
* specified value. The local value will be updated immediately and an
* event will be propagated through the system to notify all listeners
* that the attribute did change. Proxied copies of this object (on
* clients) will apply the value change when they received the
* attribute changed notification.
*/
public void setBootStamp (long value)
{
long ovalue = this.bootStamp;
requestAttributeChange(
BOOT_STAMP, Long.valueOf(value), Long.valueOf(ovalue));
this.bootStamp = value;
}
/**
* Requests that the <code>peerService</code> field be set to the
* specified value. The local value will be updated immediately and an