Commit Graph

5719 Commits

Author SHA1 Message Date
Ray Greenwell cb5398c9e8 Time is now specified in milliseconds, as is the norm for times.
Added a note.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5786 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-13 19:19:48 +00:00
Charlie Groves c6dd5ba201 Add imports for generic types in method arguments
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5785 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-13 08:40:28 +00:00
Ray Greenwell ae7373cdbc Might as well stop the timer if we're cleared.
It's the closest thing to a shutdown.

I've got half a mind to write a LinkedHashMap, and then
an ExpiringHashMap on top of that, and then have
ExpiringHashSet just utilize that in its internals.
But, YAGNI, for now... for now...


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5784 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-13 00:42:24 +00:00
Ray Greenwell 42f7ce23ac Allow the event handler to be specified in the constructor.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5783 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-13 00:27:02 +00:00
Dave Hoover 497ade64e8 Last rejiggering, I promise! (I hope)
Let entries be in multiple groups.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5782 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-12 23:52:37 +00:00
Dave Hoover 7cfee2eabd Complexity++!
Turns out when I went to use TabbedDSetEditor in my scary real-world 
application instead of nice small test cases, I wanted to do fancier
stuff where I hide certain fields for some groups, etc. Break things
up into chunks so it's possible to override the various exciting bits
of functionality and do things like that.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5781 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-12 23:29:31 +00:00
Dave Hoover e740f387cc Some widening/foreaching I had lying around.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5780 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-12 23:25:07 +00:00
Dave Hoover bbbdd3bb60 Let NamedSetAdapter do the lifting for us.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5779 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-12 23:24:42 +00:00
Ray Greenwell 305de912ff - forEach was returning the ExpiringElements, not the data.
- We shouldn't need to run checkTimer() on add(), generally.
  If adding the sole element, we can just schedule the expiration
  directly.
- Simplified and functionalized some other bits.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5778 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-12 23:09:42 +00:00
Dave Hoover bba179b372 As Ray points out, iae's more useful as the second arg to our new
exception than in the log message.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5777 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-12 21:33:46 +00:00
Dave Hoover cd07e3a9ee This puppy's been in yohoho for a while, but seems like it would be generally useful in narya land.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5776 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-12 21:21:02 +00:00
Dave Hoover ff5c1bf3e5 Let us filter what entries a DSetEditor shows with a Predicate.
And then build on that to make TabbedDSetEditor so that we can
easily break up gigantic lists of entries into smaller & more 
manageable buckets.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5775 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-12 21:13:54 +00:00
Jamie Doornbos 3fe286e3c5 Fixed unchecked cast warning
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5774 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-12 00:47:48 +00:00
Dave Hoover 239fec3236 SimpleEntry's a big boy now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5773 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-11 20:23:19 +00:00
Dave Hoover 7d3f8a2c06 Gonna need that now that I'm actually throwing some of these across the net.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5772 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-09 00:09:00 +00:00
Dave Hoover 15ca8973bc KeyWrapper is pretty handy when you really just want a DSet stuffed
full of some pre-existing Streamable/Comparable type (e.g. String),
so let's buff it up to let us do that cleanly, and publicize it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5771 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-08 18:57:58 +00:00
Andrzej Kapolka 8e2a05864a Bring this maximum back down. I had thought that oversized
datagrams were fragmented and reassembled at the network layer, 
but apparently that's not something one can count on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5770 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-07 02:22:25 +00:00
Dave Hoover 21cd434b4f Would've been better if I didn't misread the docs for "match" and had
realized my last change didn't actually work. We'll FIND stop words in
text now so our regexp doesn't have to match the whole string.

Took a peek at the as docs for RegExp.test() and it looks like the flash
side of things should be working properly after Ray duplicated this over
there, but I wouldn't mind if someone w/ that built could just double 
check that stopwords are still working properly there.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5769 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-04 18:25:12 +00:00
Michael Bayne 6c962bf3d4 Reflection is much faster these days, but we do a lot of event processing, so
let's not surreptitiously slow things down.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5768 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-04 17:50:44 +00:00
Ray Greenwell 533c7f5408 Hooverian simplification, actionscriptified.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5767 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-03 20:08:46 +00:00
Dave Hoover f3e5b1a9c2 We don't need to make _stopMatcher match the entire content of the
text that contains the stop word since the filter only cares if it
exists at all in the text.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5766 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-02 06:29:40 +00:00
Michael Bayne 6eb8953c4b Allow flush time to be customized.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5765 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-01 20:36:11 +00:00
Michael Bayne bafb7f78c0 Added elapsedSeconds().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5764 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-01 19:34:38 +00:00
Ray Greenwell 34a99c26c0 If the last arg (in the Error position) is null, assume it's a null Error and
print "error=null" rather than "null=".


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5763 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-30 21:33:22 +00:00
Nathan Curtis d56ba51b49 I appear to have a hiesenbug, so this didn't actually end up testing this... but we should be
using the new varargs fanciness, including a stack trace from the error.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5762 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-30 18:44:11 +00:00
Ray Greenwell 0e2f26df73 The uber-adapter.
I could also make this just implement each interface, but I like
being able to assign the functions to their proper names.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5761 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-30 01:31:30 +00:00
Michael Bayne a66c27a169 Track various peer stats.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5760 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-29 22:10:31 +00:00
Michael Bayne 2a4ac9b96a These don't need to be final.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5759 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-29 21:59:40 +00:00
Michael Bayne 17688e9ff5 Updated comment to reflect reality.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5758 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-29 21:59:28 +00:00
Michael Bayne e77949a143 Cleaned up stats tracking in PresentsDObjectMgr and ReportingInvoker. At some
point Pulse can probably totally replace the ReportManager at which time a
bunch of cruft can go away.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5757 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-29 19:05:04 +00:00
Dave Hoover c8dd3f1901 Expose that HashMap constructor on StreamableHashMap, too.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5756 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-29 18:59:10 +00:00
Michael Bayne f6a689cd47 Ray points out a flaw in our vizname to authname approach:
1. User logs onto node 1, node 2 establishes a viztoauth mapping.
2. User logs onto node 3 without logging out of 1, overwriting their
session.
3. Node 2 sees "member logged onto 3" and updates the viztoauth mapping.
4. Node 2 sees "member logged off of 2" and clears the viztoauth mapping.
5. Viola, there is no active viztoauth mapping, but user is online.

Distributed programming is hard. Fortunately on Whirled we can convert any
vizname to an authname without needing a mapping, so we'll just foist that
requirement onto every user of the crowd peer services (this will break Bang).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5755 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-28 17:00:10 +00:00
Ray Greenwell d65dc84d1b Fix typo.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5754 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-28 02:14:52 +00:00
Ray Greenwell e7dbda821d Removed pointless 8-char optimization.
Now it is more useful for this to hash identically as in Java.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5753 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-28 01:14:01 +00:00
Ray Greenwell 9a50e5f791 Added compare().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5752 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-28 00:07:25 +00:00
Andrzej Kapolka abc0bb9eb3 UDP fixes: we can only stop transmitting the mappings sent in the
acknowledged datagram (not the ones before it, which may or may 
not have been received).  Also, make sure we don't throw an 
ArrayIndexOutOfBounds exception when retrieving a bogus class 
mapping (so that we show the correct error logging information).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5751 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 23:28:16 +00:00
Michael Bayne 73dd5beda4 Same here even though we were doing long arithmetic which would most likely
avoid blowage.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5750 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 22:18:50 +00:00
Michael Bayne 7e777e9c72 Divide the millis by 1000 to get seconds instead of multiplying the numerator
and blowing an int.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5749 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 22:17:36 +00:00
Michael Bayne da4159c665 Switch to the ServerCommunicator. I'm sure it'll work just fine!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5748 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 19:51:06 +00:00
Michael Bayne a2d6549121 Comment fix.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5747 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 19:48:00 +00:00
Tom Conkling eb4b8674af ArrayUtil.sortedInsert
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5746 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-26 20:34:29 +00:00
Charlie Groves 749ab8e1bb google-collect upgrade
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5745 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-24 23:01:40 +00:00
Michael Bayne 510ddbb717 Instated some debug logging. Some day maybe I'll make it easy to enable debug
logging in a fine-grained way in a running server.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5744 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-24 19:03:17 +00:00
Michael Bayne 6fe7159b4c Provide an Iterable for our client objects.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5743 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-23 17:01:38 +00:00
Ray Greenwell 5df1335471 Add an easy way to initialize.
Jeez, this whole thing could *almost* go away if we moved to flash 10
and used Vector, but of course, there's no way to get the type of
Vector. Maybe there is, with describeType(). Can't experiment now.
I'd fall out of my chair if there were.
We need to know in case sending an empty array to the server,
it's still gotta be the right type (with non-empty we could
try examining the first element).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5742 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-23 00:30:44 +00:00
Ray Greenwell bfcb45434e Ye olde razor. Now that I know abjectscript like the back of my hand,
reviewing some of the first code written in it might be a good idea.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5741 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-23 00:23:34 +00:00
Michael Bayne c754d42f5b Oops, it's called addDispatcher() now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5740 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-20 17:58:18 +00:00
Michael Bayne 9155065ca8 Let's call it addDispatcher() to distinguish it from InvocationManager's
registerDispatcher() which requires a corresponding call to clearDispatcher().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5739 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-20 17:55:33 +00:00
Michael Bayne 398ee3cfa2 Grant handy automatic invocation service clearing to place manager delegates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5738 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-20 17:53:24 +00:00
Michael Bayne 1eefc50828 Common problem: place managers register dispatchers when started up and forget
to clear them when they shutdown. Solution: add a mechanism for registering
dispatchers such that they are auto-cleared when the manager shuts down.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5737 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-20 17:44:03 +00:00