Finished wiring up oid list tracking; made shutdown() work on the cher

server; added an easy mechanism to write test modules and invoke them on
the server.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@192 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-08-08 00:28:49 +00:00
parent 91d5813b37
commit 6fe9ad8a6e
7 changed files with 410 additions and 24 deletions
@@ -1,5 +1,5 @@
//
// $Id: DObject.java,v 1.20 2001/08/07 20:38:58 mdb Exp $
// $Id: DObject.java,v 1.21 2001/08/08 00:28:49 mdb Exp $
package com.threerings.cocktail.cher.dobj;
@@ -165,7 +165,7 @@ public class DObject
// scan the lock array to see if this lock is already acquired
int slot = -1;
for (int i = 0; i < _locks.length; i++) {
if (_locks[i] == null) {
if (_locks[i] == null && slot == -1) {
// keep track of this for later
slot = i;
} else if (name.equals(_locks[i])) {
@@ -343,6 +343,17 @@ public class DObject
}
}
/**
* Returns true if this object is active and registered with the
* distributed object system. If an object is created via
* <code>DObjectManager.createObject</code> it will be active until
* such time as it is destroyed.
*/
public boolean isActive ()
{
return _mgr != null;
}
/**
* Don't call this function! It initializes this distributed object
* with the supplied distributed object manager. This is called by the