Commit Graph

1369 Commits

Author SHA1 Message Date
Ray Greenwell 2f855ff35e When generating dobj files, add or remove the Generated import depending
on whether we need it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6055 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-07 21:22:53 +00:00
Dave Hoover 4b61decebb Remove trailing whitespace/unused imports
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6054 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-07 20:32:47 +00:00
Ray Greenwell 528a9d1f66 @Generated, going stag (without a date).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6052 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-07 16:12:43 +00:00
Ray Greenwell 4496ec9ae4 Mdb dislikes the date and points out that our tasks regenerate these
files every time, so it'll get in the way of version control. Mrmph.
So: make the date optional, and leave it out for now.

Other comments?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6051 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-07 16:12:04 +00:00
Ray Greenwell 43e556fb59 @Generated annotation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6050 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-07 05:33:54 +00:00
Ray Greenwell e5b45f2ef0 Add the @Generated annotation to Marshaller/Receiver classes
and various dobj bits. The @Generated annotation is "@Documented" and
retained at source only.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6049 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-07 05:32:11 +00:00
Charlie Groves d5d9b7f9ea RootDObjectManager already implements RunQueue and Executor
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6048 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-03-31 19:26:46 +00:00
Andrzej Kapolka bd6a35677a Track datagrams received out of order and missed datagrams.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6047 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-03-18 20:36:25 +00:00
Mike Thomas 5ecfff4bcb Some types of DSet may be okay with larger sizes before warning, break out the cutoff so we can override.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6046 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-03-18 16:49:38 +00:00
Michael Bayne 7eb35b5dc1 Some code hygiene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6045 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-03-16 23:57:28 +00:00
Ray Greenwell cbaa8e480e Using finalizers like this is a bad idea. I did this years ago.
At least call super() in a finally block, but I'll see if this can
be cleaned.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6039 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-02-17 02:38:11 +00:00
Dave Hoover 83f71c606e @Override gets the point across
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6038 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-02-10 20:32:51 +00:00
Dave Hoover 3414612462 Nix unused imports
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6037 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-02-10 20:32:49 +00:00
Michael Bayne 0b90f21fe3 No need for this null check. We already dereferenced _client earlier to obtain
our connection id.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6035 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-02-09 19:55:22 +00:00
Michael Bayne c7ac36ac51 This is dubious. We define an _omgr that shadows super._omgr, assign it in our
constructor and then never use it. This is almost a noop, except that
ClientDObjectMgr registers and starts a flusher interval that will never be
shutdown. Since ServerCommunicator lives for the lifetime of the server, this
has not caused problems.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6034 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-02-09 19:54:15 +00:00
Ray Greenwell c326538c07 Regenerated: DSet's just clone() now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6029 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-02-04 21:49:00 +00:00
Ray Greenwell 961fa75665 DSet.clone() has been modernized for a while now, rendering typedClone()
pointless. Let's deprecate it and auto-generate DObjects that just use clone().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6028 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-02-04 21:48:37 +00:00
Andrzej Kapolka df356599fc Don't complain if we didn't init our PeerManager; we don't do that if
we're not running in a peered environment.  Technically it might be
better to add the PeerManager to the lifecycle in init, but I don't
want to screw with the shutdown order, and this is the lowest-impact
solution.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6021 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-01-26 03:10:53 +00:00
Dave Hoover 1926012bc5 Remove now spurious casts
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6016 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-01-13 19:19:15 +00:00
Ray Greenwell c4d132b232 clone() modernization.
Apologies for the redundant cast warnings this is sure to introduce.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6015 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-01-13 18:19:48 +00:00
Ray Greenwell 3954ec5153 Updated to call ObjectInputStream.readObject() and readField() the new way.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6014 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-01-13 00:14:46 +00:00
Ray Greenwell 4c009f7a5f Simplify this, which was complexified so that it could avoid logging
when posted to a shutdown queue. There's a method we can override for that now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6013 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-01-06 20:18:11 +00:00
Dave Hoover fdf51a634a Welcome to the future.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6008 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-01-04 21:47:46 +00:00
Charlie Groves 2ba4d6a0d0 Wait to check if an interdependent invoker has posted back to the presents invoker until all the
interdependents have indicated they're blocking to check.  Otherwise the unit running before the
last BlockingUnit can post to the presents invoker and those newly posted units will be skipped.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6006 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-29 07:44:09 +00:00
Mike Thomas cb5aac620c It looks very much to me like we were able to occasionally sneak by the checks and shutdown the omgr too early in the following condition:
- PresentsInvoker decides it's empty
- It waits on other dependencies
- During the wait, something (probably from one of the other dependencies) posts to the PresentsInvoker
- We loop back around, the dependencies are empty
- We end early, with the posted bit still to be done...

So... after waiting, do a quick check for emptyness and if not satisfied, start the whole dern cycle over.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6005 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-23 19:58:34 +00:00
Dave Hoover 6ab0c7c95e As Charlie points out, that makes more sense being abstract. Shame on me for copying
NamedSetAdapter on autopilot; there you have multiple things that you might not want
to bother with, but here you damned well BETTER implement that one method yourself.

Also, while I'm at it, make that protected since I really doubt you're going to find
yourself sitting on top of an EntryAddedEvent that you're REALLY SURE is the right
one & want to pass it in to one of these by hand. And if you do, suck it up and let
the string compare burn the couple extra cycles to make sure. (I feel like making
the same change to the other Named* things here real quick, but I should really 
double check that I don't break anybody's stuff/change anything I see using it that
would now be making the named versions more visible for now good reason)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6004 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-15 23:56:39 +00:00
Dave Hoover 9269d5b617 Much like NamedSetAdapter and NamedAttributeListener, I'd like to conveniently
listen for ElementUpdatedEvents on specific bits on dobjs.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6003 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-15 23:38:06 +00:00
Ray Greenwell cd88ba7634 All Executors, all the time.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6002 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-08 19:58:55 +00:00
Ray Greenwell fc77b1bb0b Prefer Executor over RunQueue...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6001 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-08 19:05:06 +00:00
Ray Greenwell f546167ca7 RootDObjectManager (PresentsDObjectMgr) implements Executor.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6000 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-07 21:26:44 +00:00
Andrzej Kapolka ded9f02350 This is not that interesting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5998 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-13 20:54:20 +00:00
Andrzej Kapolka c88ca10d26 Provide a means of adjusting the select loop time.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5988 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-06 22:00:30 +00:00
Andrzej Kapolka a707c8b515 Set the traffic class for datagrams to low-delay. I doubt this will
actually reduce latency, but wouldn't it be cool if it did?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5985 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-06 20:56:37 +00:00
Charlie Groves 90c97a54b3 Turns out USR1 is reserved by the JVM on pretty much every platform but Mac, so only expose USR2 for
injected handling by subclasses.

I had a nice version of this that allowed user controlled handling for any signal to be injected.
Unfortunately it used multibindings from guice, and I'm loathe to add a dependency to narya just for
that.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5980 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-10-21 20:47:55 +00:00
Charlie Groves 9284f1b4b6 Expose USR1 and USR2 signals to users of AbstractSignalHandler if they bind instances of a
SignalReceiver class for those signals.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5979 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-10-19 20:58:03 +00:00
Michael Bayne ecec43418b Fluency--.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5977 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-10-04 23:26:09 +00:00
Andrzej Kapolka dd15495810 Avoid NPE for final datagrams sent/received after client cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5975 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-28 21:51:08 +00:00
Andrzej Kapolka 8cbc3fcf1a Throttle datagrams as well as streamed messages.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5974 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-27 02:23:17 +00:00
Michael Bayne 293ec52255 Some Galileo inspired raw type and dead code elimination.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5956 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-14 22:20:16 +00:00
Dave Hoover 26d982ae54 Document those so eclipse with strict docbook warnings doesn't get
cranky that they're never used.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5955 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-14 22:18:31 +00:00
Andrzej Kapolka 00569e651f Added a system for tracking the messages sent to and received from the
server for the purpose of statistics tracking.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5948 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-11 00:19:10 +00:00
Michael Bayne 05e37f4f42 This log message is not strictly necessary. The connection manager immediately
logs that it's listening on its configured ports, when start() is called. It
does so on a separate thread, but I don't believe the subtle ordering
possibilities there are something that's actually causing/likely to cause
problems and/or needs to be called out.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5947 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-10 19:42:18 +00:00
Michael Bayne 179c66f46a Missed a spot.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5946 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-10 19:39:03 +00:00
Michael Bayne 03ff9f8220 PresentsDObjectMgr.isRunning() is really isNotShutdown() and we need to
preserve those semantics. Sigh.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5945 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-10 19:38:36 +00:00
Michael Bayne f92350f1b3 Bah, don't include the PresentsDObjectMgr's state when trying to assert our
invariants.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5944 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-10 19:36:33 +00:00
Michael Bayne a8d3227fb5 You too. Naughty misreporter.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5943 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-10 19:32:06 +00:00
Michael Bayne 1c60b9cc75 Promote the datagramHostname to the bindHostname and use it for our TCP
connections as well.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5942 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-10 18:34:42 +00:00
Jamie Doornbos 701d885222 Keep track of the total number of units run independently of Stats so it is not reset every 3 minutes by pulse.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5941 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-09 23:59:02 +00:00
Par Winzell 6f7c9831d8 Comment tweak.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5940 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-09 14:50:30 +00:00
Mike Thomas 2acedb91a4 Better protection against divide-by-zero - if we have less than a second, we'll just round up to 1 second.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5938 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-04 22:42:27 +00:00