com.threerings.presents.peer.data
Class NodeObject

java.lang.Object
  extended by com.threerings.presents.dobj.DObject
      extended by com.threerings.presents.peer.data.NodeObject
All Implemented Interfaces:
Streamable
Direct Known Subclasses:
CrowdNodeObject

public class NodeObject
extends DObject

Contains information that one node published for all of its peers.


Nested Class Summary
static class NodeObject.CacheData
          Used for informing peers of changes to persistent data.
static class NodeObject.Lock
          Identifies a locked resource.
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Field Summary
static String ACQUIRING_LOCK
          The field name of the acquiringLock field.
 NodeObject.Lock acquiringLock
          Used to broadcast a node's desire to acquire a lock.
static String BOOT_STAMP
          The field name of the bootStamp field.
 long bootStamp
          The time that this node's JVM started up.
static String CACHE_DATA
          The field name of the cacheData field.
 NodeObject.CacheData cacheData
          A field we use to broadcast changes to possible cached data.
 DSet<ClientInfo> clients
          Contains information on all clients connected to this node.
static String CLIENTS
          The field name of the clients field.
 DSet<NodeObject.Lock> locks
          The set of locks held by this node.
static String LOCKS
          The field name of the locks field.
static String NODE_NAME
          The field name of the nodeName field.
 String nodeName
          The node name of this peer.
static String PEER_SERVICE
          The field name of the peerService field.
 PeerMarshaller peerService
          The service used to make requests of the node.
static String RELEASING_LOCK
          The field name of the releasingLock field.
 NodeObject.Lock releasingLock
          Used to broadcast a node's desire to release a lock.
 
Fields inherited from class com.threerings.presents.dobj.DObject
_accessors, _atable, _controller, _deathWish, _listeners, _locattrs, _locks, _oid, _omgr, _scount, _subs, _tcancelled, _tcount, _tevent
 
Constructor Summary
NodeObject()
           
 
Method Summary
 void addToClients(ClientInfo elem)
          Requests that the specified entry be added to the clients set.
 void addToLocks(NodeObject.Lock elem)
          Requests that the specified entry be added to the locks set.
 void removeFromClients(Comparable<?> key)
          Requests that the entry matching the supplied key be removed from the clients set.
 void removeFromLocks(Comparable<?> key)
          Requests that the entry matching the supplied key be removed from the locks set.
 void setAcquiringLock(NodeObject.Lock value)
          Requests that the acquiringLock field be set to the specified value.
 void setBootStamp(long value)
          Requests that the bootStamp field be set to the specified value.
 void setCacheData(NodeObject.CacheData value)
          Requests that the cacheData field be set to the specified value.
 void setClients(DSet<ClientInfo> value)
          Requests that the clients field be set to the specified value.
 void setLocks(DSet<NodeObject.Lock> value)
          Requests that the locks field be set to the specified value.
 void setNodeName(String value)
          Requests that the nodeName field be set to the specified value.
 void setPeerService(PeerMarshaller value)
          Requests that the peerService field be set to the specified value.
 void setReleasingLock(NodeObject.Lock value)
          Requests that the releasingLock field be set to the specified value.
 void updateClients(ClientInfo elem)
          Requests that the specified entry be updated in the clients set.
 void updateLocks(NodeObject.Lock elem)
          Requests that the specified entry be updated in the locks set.
 
Methods inherited from class com.threerings.presents.dobj.DObject
acquireLock, addListener, addListener, addSubscriber, addToSet, cancelTransaction, changeAttribute, checkPermissions, checkPermissions, clearLock, clearTransaction, commitTransaction, createAccessors, destroy, getAccessController, getAccessor, getAttribute, getListenerIndex, getLocal, getLocals, getManager, getOid, getSet, inTransaction, isActive, isAuthoritative, notifyListeners, notifyProxies, postEvent, postMessage, postMessage, releaseLock, removeFromSet, removeListener, removeSubscriber, requestAttributeChange, requestAttributeChange, requestElementUpdate, requestElementUpdate, requestEntryAdd, requestEntryRemove, requestEntryUpdate, requestEntryUpdate, requestOidAdd, requestOidAdd, requestOidRemove, requestOidRemove, setAccessController, setAttribute, setDestroyOnLastSubscriberRemoved, setLocal, setManager, setOid, startTransaction, toString, toString, updateSet, which, which
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NODE_NAME

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public static final String NODE_NAME
The field name of the nodeName field.

See Also:
Constant Field Values

BOOT_STAMP

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public static final String BOOT_STAMP
The field name of the bootStamp field.

See Also:
Constant Field Values

PEER_SERVICE

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public static final String PEER_SERVICE
The field name of the peerService field.

See Also:
Constant Field Values

CLIENTS

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public static final String CLIENTS
The field name of the clients field.

See Also:
Constant Field Values

LOCKS

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public static final String LOCKS
The field name of the locks field.

See Also:
Constant Field Values

ACQUIRING_LOCK

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public static final String ACQUIRING_LOCK
The field name of the acquiringLock field.

See Also:
Constant Field Values

RELEASING_LOCK

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public static final String RELEASING_LOCK
The field name of the releasingLock field.

See Also:
Constant Field Values

CACHE_DATA

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public static final String CACHE_DATA
The field name of the cacheData field.

See Also:
Constant Field Values

nodeName

public String nodeName
The node name of this peer.


bootStamp

public long bootStamp
The time that this node's JVM started up.


peerService

public PeerMarshaller peerService
The service used to make requests of the node.


clients

public DSet<ClientInfo> clients
Contains information on all clients connected to this node.


locks

public DSet<NodeObject.Lock> locks
The set of locks held by this node.


acquiringLock

public NodeObject.Lock acquiringLock
Used to broadcast a node's desire to acquire a lock.


releasingLock

public NodeObject.Lock releasingLock
Used to broadcast a node's desire to release a lock.


cacheData

public NodeObject.CacheData cacheData
A field we use to broadcast changes to possible cached data.

Constructor Detail

NodeObject

public NodeObject()
Method Detail

setNodeName

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void setNodeName(String value)
Requests that the nodeName 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.


setBootStamp

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void setBootStamp(long value)
Requests that the bootStamp 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.


setPeerService

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void setPeerService(PeerMarshaller value)
Requests that the peerService 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.


addToClients

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void addToClients(ClientInfo elem)
Requests that the specified entry be added to the clients set. The set will not change until the event is actually propagated through the system.


removeFromClients

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void removeFromClients(Comparable<?> key)
Requests that the entry matching the supplied key be removed from the clients set. The set will not change until the event is actually propagated through the system.


updateClients

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void updateClients(ClientInfo elem)
Requests that the specified entry be updated in the clients set. The set will not change until the event is actually propagated through the system.


setClients

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void setClients(DSet<ClientInfo> value)
Requests that the clients field be set to the specified value. Generally one only adds, updates and removes entries of a distributed set, but certain situations call for a complete replacement of the set 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.


addToLocks

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void addToLocks(NodeObject.Lock elem)
Requests that the specified entry be added to the locks set. The set will not change until the event is actually propagated through the system.


removeFromLocks

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void removeFromLocks(Comparable<?> key)
Requests that the entry matching the supplied key be removed from the locks set. The set will not change until the event is actually propagated through the system.


updateLocks

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void updateLocks(NodeObject.Lock elem)
Requests that the specified entry be updated in the locks set. The set will not change until the event is actually propagated through the system.


setLocks

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void setLocks(DSet<NodeObject.Lock> value)
Requests that the locks field be set to the specified value. Generally one only adds, updates and removes entries of a distributed set, but certain situations call for a complete replacement of the set 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.


setAcquiringLock

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void setAcquiringLock(NodeObject.Lock value)
Requests that the acquiringLock 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.


setReleasingLock

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void setReleasingLock(NodeObject.Lock value)
Requests that the releasingLock 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.


setCacheData

@Generated(value="com.threerings.presents.tools.GenDObjectTask")
public void setCacheData(NodeObject.CacheData value)
Requests that the cacheData 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.