Commit Graph

4217 Commits

Author SHA1 Message Date
Dave Hoover 8856120403 Import cleanups
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5399 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-26 17:29:59 +00:00
Michael Bayne e517ba314e Make this guy injectable as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5391 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 00:10:50 +00:00
Michael Bayne 8fa16ca650 Make this repository injectable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5390 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-24 18:54:47 +00:00
Michael Bayne 6adabaf442 Close resolved channels that have been idle for 5 minutes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5383 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-18 18:07:19 +00:00
Michael Bayne f139ec53f4 That injected service needs to be transient.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5381 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-17 23:08:28 +00:00
Michael Bayne dc4e4315da If we request to invoke an action directly on a node, do the right thing if
that node is us.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5380 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-17 23:08:02 +00:00
Ray Greenwell 1c711f493d Google's Predicate is an interface, and the build server uses Java 5,
and you can't use @Override in java 5 when implementing an interface method.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5378 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-16 22:59:17 +00:00
Ray Greenwell 1f3b968a00 Use google's Predicate class instead of samskivert's.
- It's probably "more" standard, and maybe when they finally add Predicate
  to java.util, it will be based on google's implementation.
- Unfortunately this is a little less efficient at runtime. The samskivert
  Predicate can filter into a new Collection that knows its size, google's
  code just returns an Iterable that is a *view* on the Iterable passed
  in, so it doesn't know how many elements are in it. When we copy it into
  an array, a List is first created to receive all the filtered elements
  from this view, then that List is turned into an array. Oh well, it's
  less lines of code here in this class thanks to Google's fun libs.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5375 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-16 22:32:48 +00:00
Matt Jensen 856319ede0 Fixed a couple tiny javadoc typ-o's.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5372 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-14 23:01:16 +00:00
Jamie Doornbos d6fbde6e0d Forgot header and props for added files
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5371 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-12 23:47:24 +00:00
Jamie Doornbos 4a03b20b1f Extension of the samskivert throttle class to allow updating the operation limit, plus a small manual test class
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5370 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-12 23:26:58 +00:00
Dave Hoover 7ee6ace683 Javadoc warnings cleanups.
Note: this involves generated code from a samskivert patch I only just sent to mdb,
but he's in a meeting, so that won't show up for a little.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5369 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-12 17:59:26 +00:00
Michael Bayne 8114439855 Handle having a null caller.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5368 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-11 23:35:09 +00:00
Michael Bayne 1852e79477 Decode the action on the local server from the bytes so that we can catch a
failure to implement a zero arg constructor even in a developer's single server
test environment.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5367 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-11 23:32:57 +00:00
Michael Bayne 7e7e7893d6 No need for this to be specific to persistence.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5348 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-03 18:40:29 +00:00
Michael Bayne 5a41c876b4 Updated to use new DatabaseException.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5347 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-03 16:20:30 +00:00
Mike Thomas addb1971dd Break out the binding of the invokers so we can bind them elsewhere in a subclass.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5346 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-30 00:15:04 +00:00
Dave Hoover 18a69ba281 It's potentially poor form to be passing null in as one of the
things to stuff into a translated string, but I've seen it happen
in internalish yohoho messages, so let's not blow up.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5339 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-25 17:21:53 +00:00
Michael Bayne d9ee8b91d1 We want to hear about the exception as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5337 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-25 15:29:33 +00:00
Charlie Groves e1491dcd06 Add a generifying factory method
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5334 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-21 20:35:53 +00:00
Charlie Groves 80ca1dbc64 Fix broken javadoc links and params to kill my Eclipse warnings. This includes
importing receivers from their senders to satisfy their links.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5333 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-21 01:46:51 +00:00
Jamie Doornbos 495e29fa05 Actually append the creds. Why was I not surprised by creds=] when I tested this?
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5331 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-20 04:52:08 +00:00
Bruno Garcia c5bc67d66a Planting a flag on this landmine, change to equals() if desired
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5327 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-15 23:55:46 +00:00
Dave Hoover df2e316330 Pedanticism police.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5326 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-15 23:19:25 +00:00
Bruno Garcia f632356dfc Only go through getSuffix once, and don't call getResourceString more than necessary.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5325 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-15 22:41:38 +00:00
Bruno Garcia 29204b385d If the suffixed message key for integers is missing, fall back to the unsuffixed key instead of banking on the ".n" suffix.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5323 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-15 21:45:36 +00:00
Jamie Doornbos 172349abb3 Give a little bit of information about Client instances when one is logged. This is for the bureau
launcher which manages a lot of clients, but seems generally useful.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5322 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-14 20:53:35 +00:00
Michael Bayne 716f7ab956 Make it possible to find out if we're shutting down or not.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5321 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-13 23:02:21 +00:00
Michael Bayne 40e64e2cf9 Ray suggests we call it asSet() instead of toSet() since it's a view.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5320 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-13 20:49:02 +00:00
Michael Bayne ca56aa97aa Provide an immutable view of a DSet a Set for when you want to roll Java
Collections style.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5319 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-13 20:32:48 +00:00
Michael Bayne fcedbe90d7 Thread.dumpStack() circumvents whatever logging is configured and writes
directly to stderr. Logging an exception with the associated warning does the
right thing and logs the stack trace via the logging system.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5318 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-13 17:35:37 +00:00
Andrzej Kapolka b323bf6bf9 I'm not exactly sure, but it looks like this should be flagged as
a singleton.  At any rate, it fixes Project X, which we're 
supposed to demo soon.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5317 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-12 20:50:02 +00:00
Michael Bayne d293fe5140 Fixed comment.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5316 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-12 18:19:07 +00:00
Michael Bayne 6866f6b609 Allow things that requireEventThread() to proceed if they are called during the
server initialization phase. Only after the event thread is established is it
unsafe to be wild and wooly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5315 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-12 18:18:08 +00:00
Michael Bayne e137667f07 Updated some comments, added some sanity checks to registerDispatcher() and
clearDispatcher() as I saw some craziness in the wild.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5314 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-12 16:57:46 +00:00
Tom Conkling c1442d8b17 Include the Throwable in the warning here
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5313 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-12 00:51:01 +00:00
Nathan Curtis c9e73fd320 unused import patrol
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5312 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-11 22:41:58 +00:00
Michael Bayne 1d3122d11c Handle failure properly now that shutdown tries to finish up.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5307 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-11 20:19:28 +00:00
Michael Bayne 5c3b5e9af3 Finish off what's in our queue before allowing the writer to exit. This ensures
that the LogoffRequest is sent to the server even if we have one or more
pending messages on the writer's queue at the time of logoff().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5306 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-11 20:17:36 +00:00
Michael Bayne 421272f4f2 Basic framework for distributed chat channel system that does not use chat
channel distributed objects but rather resolves the location of all channel
participants on every message delivery so that we don't have to attempt the
very fragile process of having every server that hosts a channel participant
maintain a subscription to the chat channel object on another peer.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5305 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-10 02:40:19 +00:00
Michael Bayne eda49af57b Let's just use a runnable there. Having the node action turns out not to be
super useful. If one really needs it they can keep a final reference around.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5304 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-10 02:16:54 +00:00
Michael Bayne 7481cdd5a1 Regenerated services.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5303 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-10 01:22:56 +00:00
Michael Bayne 2cb05c165d A few things:
- switched to Google Base's Function interface instead of rolling our own
various function interfaces;
- added invokeNodeAction() that invokes directly on a single node with no
checking;
- added an onDropped callback that will be invoked if a node action fails to
match any nodes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5302 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-10 01:16:31 +00:00
Michael Bayne 8ba97d2f70 Switch NodeAction to use the Presents streaming system instead of
Serializable. I wanted to avoid having to declare a bazillion no argument
constructors, but it's too annoying to have to make all the Presents streamable
classes that one naturally wants to send between servers also Serializable.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5301 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-09 23:04:35 +00:00
Michael Bayne 01a39e500a No longer need this tracking.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5298 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-07 21:00:26 +00:00
Michael Bayne 3385e9ba4a It's not entirely obvious how we should respond to multiple calls to logoff()
fired in such rapid succession that we have not completed processing the first
call before the next one comes in. We could do the cumbersome thing and keep
track of an _isLoggingOff state but that is so inelegant that I can't bear to
do it. I'd rather just cope in the Presents code and put the onus on the caller
not to do wacky things like this.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5296 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-07 16:52:19 +00:00
Michael Bayne 294f0fd1f1 Keep a history of what we do with subscriptions so that we can get some insight
into the thousands of "Missing subscription in unmap" errors that we have been
getting as a matter of course.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5293 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-05 13:12:18 +00:00
Michael Bayne 5c664a2667 Report a bit more information in these strange edge cases.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5292 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-05 12:49:40 +00:00
Michael Bayne beadc8745c Check whether arg unwrapping will result in a cast to a generic type and in
that case, suppress unchecked warnings. We do this on the whole method because
doing it for each argument would vastly complicate things and we can be fairly
confident that this generated code will not have other dangerous casts added to
it that would be hidden by the suppression.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5291 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-04 21:02:15 +00:00
Nathan Curtis d3d3528d83 Fix another issue with the log message in here. That would have looked strange indeed, in the logs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5290 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-04 18:49:42 +00:00