Commit Graph

34 Commits

Author SHA1 Message Date
Ray Greenwell 16322b1422 Added some warnings for illegal DSet operations and added a small
optimization in the process.
Previously, we dumped stack on the server if a entry add was illegal but
did nothing for update/remove.
On the client, we complained for updates and (indirectly) adds, but not
removes.
Now we complain everywhere.
And- as an added bonus, on the server we now do only one binary search for
updates and removals. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3528 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-29 02:30:23 +00:00
Ray Greenwell 12b267dbae One day we hope to implement Iterable, let's implement the standard
'iterator()' name and deprecate the old 'entries()' method.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3405 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 01:40:22 +00:00
Michael Bayne a9720fd905 LGPLed the library. Hello world.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3099 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-27 02:21:06 +00:00
Michael Bayne 10ceff36d2 Log up a warning in these trying circumstances so that future bugs don't
remain obscure.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2708 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-07-13 02:59:27 +00:00
Michael Bayne d37c56b077 Added more substantial funny business checks.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2701 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-07-11 01:49:52 +00:00
Ray Greenwell 71cd8b421a - Use the newer binary search method of locating entries in get().
- Require a Comparable key in get() and containsKey().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2698 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-07-11 01:21:23 +00:00
Michael Bayne 1b29c23f6e Check and fail if a DSet is modified while we are iterating over it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2380 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-05 20:30:44 +00:00
Ray Greenwell a8ca78bde2 toArray now returns Object[] instead of Object
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2327 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-26 00:16:03 +00:00
Michael Bayne 7b97f872c8 Allow initialization from an array of entries.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2285 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-18 19:50:34 +00:00
Michael Bayne 48823b10f9 More revamped serialization cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2079 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-20 23:41:27 +00:00
Michael Bayne ee9049fe3e Factored out code for events that all shared a name; removed
hand-serialization code for fields which are now handled automatically.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2078 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-20 23:29:04 +00:00
Michael Bayne 90b76f1417 Added a toArray() method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2065 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-13 02:07:27 +00:00
Michael Bayne 14a313486b Documentation repairs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1842 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-27 18:49:51 +00:00
Ray Greenwell be2bc4205b Anally removed Comparator.equals() implementations that overrode
Object.equals() with equivalent functionality.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1799 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-15 21:01:39 +00:00
Michael Bayne 893e3d3aa0 Whoops, clone should obtain the uninitialized cloned object via
super.clone() so that it is of the appropriate derived class. I must have
picked a bad week to stop sniffing glue.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1781 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-06 20:24:53 +00:00
Michael Bayne 165843ac96 Fixed calculation error.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1643 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-14 23:52:15 +00:00
Michael Bayne e54a4d41f4 The great invocation services rethink of 2002! Rearchitected the remote
method invocation services and converted everything to the new style.
Could this be my biggest checkin ever?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1642 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-14 19:08:01 +00:00
Michael Bayne c3191b9170 Brought code into line with the new streaming world order.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1606 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-23 05:52:49 +00:00
Michael Bayne 7ccb9594b9 Changed DSet.Element to DSet.Entry in preparation for the addition of
array element update support. (Arrays have elements, sets have entries.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1133 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-18 23:21:26 +00:00
Michael Bayne 1e36cb65d8 Need to prefix heterogenous set elements with their classname.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@964 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-08 05:14:22 +00:00
Michael Bayne b4d5f7da24 Have to cope with heterogenous sets in toString().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@963 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-08 04:44:32 +00:00
Michael Bayne 5bb4e3435b Provided a mechanism by which a DSet can be populated at construct time.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@927 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-04 01:34:59 +00:00
Michael Bayne 25717d3cce Modified distributed sets such that they can be heterogenous or
homogenous, and in the latter case, they simply conserve network bandwidth
by not transmitting the classname of serialized elements when transmitting
themselves or element added/updated events.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@925 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-04 00:50:12 +00:00
Michael Bayne dec8be5d57 Added size(), fixed two bugs in internal array expansion: one was that it
was doubling the size of the internal array every time add() was called,
whether it needed to or not, the other was that unserializing an empty set
caused expand() to be called with -1 as the index from which mayhem would
ensue.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@463 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-16 16:43:20 +00:00
Michael Bayne 0b44521984 Implement clone().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@456 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 20:11:00 +00:00
Michael Bayne 8521994204 DSet needs to implement Streamable so that we can pass it around as a
distributed value.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@442 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 00:29:34 +00:00
Michael Bayne 8a4c46badc The first great Three Rings renaming. Cocktail changed to Narya, Cher
changed to Presents and Party changed to Crowd. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@431 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-11 04:07:54 +00:00
Michael Bayne 6620936a04 We've always been at war with Eurasia. Changed InvocationManager to
InvocationDirector (please god let the renaming be done). Removed IntMap
and modified code to use samskivert's HashIntMap.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@375 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-02 02:08:16 +00:00
Michael Bayne 70eb9480d8 Made element iteration work properly.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@291 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 19:35:56 +00:00
Michael Bayne dac504c7bb Provide support for iterating over a DSet.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@283 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 00:58:26 +00:00
Michael Bayne b7b78e9f79 Wired up marshalling for DSet objects.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@277 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-20 21:44:10 +00:00
Michael Bayne eac3e9aa94 Edits.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@268 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-16 04:22:50 +00:00
Michael Bayne 890bad996e Added ability to update elements in a set.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@266 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-16 03:45:43 +00:00
Michael Bayne 55c4847a17 Added support for distributed sets: unordered collections of elements
where the elements are user defined objects that know how to read and
write themselves on a stream. Sets are required to contain elements all of
the same type to make network traffic more efficient (avoid sending the
classname every time an element is added or removed).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@264 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-16 03:31:09 +00:00