Use Comparable for the to be removed distributed set key.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2290 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# $Id: gendobj,v 1.14 2002/08/09 03:35:47 mdb Exp $
|
||||
# $Id: gendobj,v 1.15 2003/02/26 17:54:55 mdb Exp $
|
||||
#
|
||||
# gendobj is used to generate DObject source file definitons basded on
|
||||
# abbreviated declarations. Because DObject fields all have standard
|
||||
@@ -179,7 +179,7 @@ sub print_dobj_setters
|
||||
* the <code>$field</code> set. The set will not change until the
|
||||
* event is actually propagated through the system.
|
||||
*/
|
||||
public void removeFrom$cfield (Object key)
|
||||
public void removeFrom$cfield (Comparable key)
|
||||
{
|
||||
requestEntryRemove($fcode, key);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: PlaceObject.java,v 1.9 2002/10/09 06:33:48 mdb Exp $
|
||||
// $Id: PlaceObject.java,v 1.10 2003/02/26 17:54:55 mdb Exp $
|
||||
|
||||
package com.threerings.crowd.data;
|
||||
|
||||
@@ -97,7 +97,7 @@ public class PlaceObject extends DObject
|
||||
* the <code>occupantInfo</code> set. The set will not change until the
|
||||
* event is actually propagated through the system.
|
||||
*/
|
||||
public void removeFromOccupantInfo (Object key)
|
||||
public void removeFromOccupantInfo (Comparable key)
|
||||
{
|
||||
requestEntryRemove(OCCUPANT_INFO, key);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: LocationProvider.java,v 1.18 2002/10/04 01:31:43 mdb Exp $
|
||||
// $Id: LocationProvider.java,v 1.19 2003/02/26 17:54:56 mdb Exp $
|
||||
|
||||
package com.threerings.crowd.server;
|
||||
|
||||
@@ -154,7 +154,7 @@ public class LocationProvider
|
||||
try {
|
||||
PlaceObject pold = (PlaceObject)_omgr.getObject(oldloc);
|
||||
if (pold != null) {
|
||||
Object key = new Integer(bodoid);
|
||||
Integer key = new Integer(bodoid);
|
||||
try {
|
||||
pold.startTransaction();
|
||||
// remove their occupant info (which is keyed on oid)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: PlaceManager.java,v 1.42 2003/02/05 00:23:33 mdb Exp $
|
||||
// $Id: PlaceManager.java,v 1.43 2003/02/26 17:54:56 mdb Exp $
|
||||
|
||||
package com.threerings.crowd.server;
|
||||
|
||||
@@ -380,7 +380,7 @@ public class PlaceManager
|
||||
// if their occupant info hasn't been removed (which may be the
|
||||
// case if they logged off rather than left via a MoveTo request),
|
||||
// we need to get it on out of here
|
||||
Object key = new Integer(bodyOid);
|
||||
Integer key = new Integer(bodyOid);
|
||||
if (_plobj.occupantInfo.containsKey(key)) {
|
||||
_plobj.removeFromOccupantInfo(key);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TableLobbyObject.dobj,v 1.3 2002/07/23 05:54:52 mdb Exp $
|
||||
// $Id: TableLobbyObject.dobj,v 1.4 2003/02/26 17:54:56 mdb Exp $
|
||||
|
||||
package com.threerings.micasa.lobby.table;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class TableLobbyObject
|
||||
}
|
||||
|
||||
// documentation inherited from interface
|
||||
public void removeFromTables (Object key)
|
||||
public void removeFromTables (Comparable key)
|
||||
{
|
||||
removeFromTableSet(key);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TableLobbyObject.java,v 1.5 2002/07/23 05:54:52 mdb Exp $
|
||||
// $Id: TableLobbyObject.java,v 1.6 2003/02/26 17:54:56 mdb Exp $
|
||||
|
||||
package com.threerings.micasa.lobby.table;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class TableLobbyObject
|
||||
}
|
||||
|
||||
// documentation inherited from interface
|
||||
public void removeFromTables (Object key)
|
||||
public void removeFromTables (Comparable key)
|
||||
{
|
||||
removeFromTableSet(key);
|
||||
}
|
||||
@@ -56,7 +56,7 @@ public class TableLobbyObject
|
||||
* the <code>tableSet</code> set. The set will not change until the
|
||||
* event is actually propagated through the system.
|
||||
*/
|
||||
public void removeFromTableSet (Object key)
|
||||
public void removeFromTableSet (Comparable key)
|
||||
{
|
||||
requestEntryRemove(TABLE_SET, key);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TableLobbyObject.java,v 1.1 2001/10/19 02:04:29 mdb Exp $
|
||||
// $Id: TableLobbyObject.java,v 1.2 2003/02/26 17:54:56 mdb Exp $
|
||||
|
||||
package com.threerings.parlor.data;
|
||||
|
||||
@@ -34,5 +34,5 @@ public interface TableLobbyObject
|
||||
* Removes the table instance that matches the specified key from the
|
||||
* tables set (using the appropriate distributed object mechanisms).
|
||||
*/
|
||||
public void removeFromTables (Object key);
|
||||
public void removeFromTables (Comparable key);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ClientObject.java,v 1.5 2002/11/26 02:14:24 mdb Exp $
|
||||
// $Id: ClientObject.java,v 1.6 2003/02/26 17:54:56 mdb Exp $
|
||||
|
||||
package com.threerings.presents.data;
|
||||
|
||||
@@ -78,7 +78,7 @@ public class ClientObject extends DObject
|
||||
* the <code>receivers</code> set. The set will not change until the
|
||||
* event is actually propagated through the system.
|
||||
*/
|
||||
public void removeFromReceivers (Object key)
|
||||
public void removeFromReceivers (Comparable key)
|
||||
{
|
||||
requestEntryRemove(RECEIVERS, key);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: DObject.java,v 1.58 2003/02/18 18:59:08 mdb Exp $
|
||||
// $Id: DObject.java,v 1.59 2003/02/26 17:54:56 mdb Exp $
|
||||
|
||||
package com.threerings.presents.dobj;
|
||||
|
||||
@@ -787,7 +787,7 @@ public class DObject implements Streamable
|
||||
/**
|
||||
* Calls by derived instances when a set remover method was called.
|
||||
*/
|
||||
protected void requestEntryRemove (String name, Object key)
|
||||
protected void requestEntryRemove (String name, Comparable key)
|
||||
{
|
||||
// dispatch an entry removed event
|
||||
postEvent(new EntryRemovedEvent(_oid, name, key));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: EntryRemovedEvent.java,v 1.11 2002/12/20 23:29:04 mdb Exp $
|
||||
// $Id: EntryRemovedEvent.java,v 1.12 2003/02/26 17:54:56 mdb Exp $
|
||||
|
||||
package com.threerings.presents.dobj;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class EntryRemovedEvent extends NamedEvent
|
||||
* specified entry.
|
||||
* @param key the entry key that identifies the entry to remove.
|
||||
*/
|
||||
public EntryRemovedEvent (int targetOid, String name, Object key)
|
||||
public EntryRemovedEvent (int targetOid, String name, Comparable key)
|
||||
{
|
||||
super(targetOid, name);
|
||||
_key = key;
|
||||
@@ -40,7 +40,7 @@ public class EntryRemovedEvent extends NamedEvent
|
||||
/**
|
||||
* Returns the key that identifies the entry that has been removed.
|
||||
*/
|
||||
public Object getKey ()
|
||||
public Comparable getKey ()
|
||||
{
|
||||
return _key;
|
||||
}
|
||||
@@ -83,6 +83,6 @@ public class EntryRemovedEvent extends NamedEvent
|
||||
buf.append(", key=").append(_key);
|
||||
}
|
||||
|
||||
protected Object _key;
|
||||
protected Comparable _key;
|
||||
protected transient DSet.Entry _oldEntry;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: SpotSceneObject.java,v 1.2 2003/02/13 21:55:22 mdb Exp $
|
||||
// $Id: SpotSceneObject.java,v 1.3 2003/02/26 17:54:56 mdb Exp $
|
||||
|
||||
package com.threerings.whirled.spot.data;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class SpotSceneObject extends SceneObject
|
||||
* the <code>occupantLocs</code> set. The set will not change until the
|
||||
* event is actually propagated through the system.
|
||||
*/
|
||||
public void removeFromOccupantLocs (Object key)
|
||||
public void removeFromOccupantLocs (Comparable key)
|
||||
{
|
||||
requestEntryRemove(OCCUPANT_LOCS, key);
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public class SpotSceneObject extends SceneObject
|
||||
* the <code>clusters</code> set. The set will not change until the
|
||||
* event is actually propagated through the system.
|
||||
*/
|
||||
public void removeFromClusters (Object key)
|
||||
public void removeFromClusters (Comparable key)
|
||||
{
|
||||
requestEntryRemove(CLUSTERS, key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user