Commit Graph

5699 Commits

Author SHA1 Message Date
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
Mike Thomas 48b3a27af8 Prevent a divide by zero error attempting to generate a log.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5736 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-20 17:12:27 +00:00
Michael Bayne 916cb30339 Clear out our _bstrap reference when we logoff. What's good for the
ActionScript goose is good for the Java gander.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5735 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-18 00:07:54 +00:00
Michael Bayne c21f8ad735 Clear out our _bstrap reference after we logoff.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5734 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-18 00:06:06 +00:00
Michael Bayne 597062f0bc Oops. Can't do that.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5733 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 22:57:55 +00:00
Michael Bayne 51f1f273d9 Allow 1.6 source but continue to target 1.5 bytecode.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5732 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 22:49:29 +00:00
Ray Greenwell f03caf98fe Use Util.adapt(). Look at this functional programming masterpiece.
I'm not sure how much actual utility is here, and how much I just like the
gee-whiz factor.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5731 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 21:27:35 +00:00
Ray Greenwell 62fb546f27 Check this out. This little buddy rocks.
I sorta want to make a new FunctionUtil so that I can use it
with impunity everwhere without having to include the other crap in here.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5730 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 21:23:23 +00:00
Ray Greenwell bb87184632 Should resolve infinite recursion with SortedHashMap.
Tip from the pros: when you change a class, you might want to check
the subclasses for possible problems with that change.
:P


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5729 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 20:01:01 +00:00
Ray Greenwell 96bdaf9f1f Allow XML to be encoded.
Let's try it and see if it works. Let us know Nathan.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5728 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 01:06:00 +00:00
Ray Greenwell d354d951b8 Small tweaks. Apply directly to the nipples.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5727 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 23:00:36 +00:00
Ray Greenwell cbbd1f281d WeakValueHashMap. Apply directly to the ...
I hate your checkin comments, but I love your product!

The real reason I cleaned up HashMap: I override
forEach(), and now I don't need to do anything to make values() and keys()
work properly for weak values. Less code is better code.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5726 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 22:55:40 +00:00
Ray Greenwell dbf20bdc28 WeakReference. Apply directly to the forehead.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5725 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 22:53:35 +00:00
Ray Greenwell 3300421741 - Use [] instead of "new Array()"
- Implement keys() and values() using forEach().
  - Less code is better code.
  - But, it's less efficient:
    - values() now looks up simple-key values by hashing
    - values() now unwraps non-simple keys, even though unneeded
    - keys() looks up simple-key values, even though unneeded

Say it with me like a 14-year-old girl: whatEVER!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5724 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 22:51:12 +00:00
Jamie Doornbos e76d1a6610 Interesting... if the peer disconnects before the node object subscription completes, an NPE would fire... but could this have prevented a lock from being release. It doesn't seem likely since a lock probably can't be assigned until the subscription is complete anyway(?). But then again, maybe some information is passed prior to this. In any case, stop throwing an NPE here.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5723 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 17:12:15 +00:00
Ray Greenwell 0f73afc492 This class is remarkably pointless.
We could trash it and change our toStringBuf() methods
to just return a String. I guess. Then the caller would
have to assign the string somewhere. I guess this has some value.

So anyway: Occam's razor, and fixes a small bug: appending undefined
would print as "null" since it was being forced to an Object first.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5722 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 20:25:26 +00:00
Ray Greenwell 305c53f53a These are breaking asdoc.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5721 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 18:52:15 +00:00
Michael Bayne 61f752a105 Check the right things in our Preconditions.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5720 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 00:28:07 +00:00
Michael Bayne b160aa944f Let's just have SafeSubscriber take two callbacks instead of forcing everyone
to screw around with SubscriberAdapter.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5719 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 00:22:24 +00:00
Michael Bayne 202f6bba81 Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5718 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 00:13:29 +00:00
Michael Bayne e1b29dbf6f The BodyObject can definitely supply its Name.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5717 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-14 16:31:17 +00:00