Mike Thomas
ba0ba7f659
Instead of NPEing when we reset _oin at a bad time, let's throw an exception we can better handle and reduce some log spew.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6150 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-09 17:35:44 +00:00
Charlie Groves
908bee05c4
Stop lying
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6148 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-08 19:29:51 +00:00
Charlie Groves
be64ef83f1
Create the directories for generated files if necessary
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6147 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-07 23:45:04 +00:00
Charlie Groves
d35526a3c4
Unused imports
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6146 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-07 21:03:33 +00:00
Par Winzell
e7bd54fa2d
Fix up imports, cuddle braces, use fancy .concat().
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6145 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-07 20:08:25 +00:00
Par Winzell
73e44953d7
Argh. Java6->5 fixes.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6144 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-07 19:26:42 +00:00
Par Winzell
59588467f7
Forgot the final message sort.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6143 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-07 19:13:02 +00:00
Par Winzell
628e03beed
As the first application of the new invokeNodeRequest, rip all the chat collection stuff out of CrowdPeerManager and into the chat package where it belongs.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6142 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-07 19:10:00 +00:00
Par Winzell
5365b53ee6
Let's take invokdeNodeRequest the final distance; NodeRequest allows each peer to submit a result, so let's pass those results back to the caller instead of throwing them away. With this, we should be able to stop shoving all complex peer operations into PeerManager subclasses, and instead sprinkling them as NodeRequests in the sub-packages in which they belong.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6141 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-07 19:08:26 +00:00
Par Winzell
a9c4b051e0
Let's not flip out on templated fields.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6140 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-06 01:15:49 +00:00
Dave Hoover
21d985b468
Speeling
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6139 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-03 00:29:55 +00:00
Andrzej Kapolka
73d2bd1741
Rather than delaying datagrams if we've exceeded the throttle, just drop them.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6137 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-28 02:30:17 +00:00
Andrzej Kapolka
90929ab5d7
Fix for reconnection issue in Project X. When clients disconnect, we need to
...
reset the throttle state. When they reconnect, we need to resend the message
rate.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6136 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-28 02:14:09 +00:00
Michael Bayne
9bdf1f8ef1
Serialize the request early so that developers find out as soon as possible if
...
they're fucking up. Also fixed up a comment.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6135 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-27 23:02:23 +00:00
Mike Thomas
d99d17ca7a
Make NodeRequests a bit fancier for hitting multiple nodes.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6134 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-27 01:06:06 +00:00
Charlie Groves
0e575a8b6f
Allow peers to specify a namespace. If they do, only hook up to peers with node names starting
...
with the namespace.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6133 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-24 22:51:15 +00:00
Charlie Groves
543a0d8a57
Allow subclasses to change how signal handlers are registered
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6132 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-23 22:28:29 +00:00
Charlie Groves
8818511502
Pass the receiver code through
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6131 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-16 21:39:48 +00:00
Charlie Groves
2cdc445b1f
Have ServiceDescription carry skipAS like it does the rest of the processing information
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6130 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-12 21:00:49 +00:00
Charlie Groves
c12e1e44b3
Multimap is pretty rad
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6129 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-12 20:59:47 +00:00
Ray Greenwell
696f77beb5
Fix possible ClassCastException, because DSet.contains(E entry)
...
will type-erase to DSet.Entry. Ensure objects tested for containment
in our Set view implement that.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6128 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-11 20:34:27 +00:00
Ray Greenwell
891ca8db44
Since we have a runtime type token here,
...
it's best to avoid the @SuppressWarnings annotation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6127 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-11 20:32:26 +00:00
Dave Hoover
11c52c06eb
Whitespace
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6126 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-11 18:09:12 +00:00
Dave Hoover
1108d3c0db
Factory methods for StreamableArrayList and StreamableHashSet
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6125 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-11 18:09:11 +00:00
Ray Greenwell
4bf5490c35
Removed accidentally committed debuggery.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6123 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-11 03:39:30 +00:00
Charlie Groves
f98e5e9abf
Gonna need that name before we try to load it
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6122 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-11 03:19:01 +00:00
Ray Greenwell
7badbbd20f
This AssertionError is new. Mdb added it. It freaks something out in p-x.
...
I suppose we could stop checking to see if a class's fields are
all streamable once we see that it has custom writeObject() and readObject()
methods, but those methods could call defaultWriteObject() or
defaultReadObject().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6121 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-11 00:42:32 +00:00
Charlie Groves
c1ac294171
Succincter
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6120 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-11 00:27:48 +00:00
Ray Greenwell
931d72f4b5
Streaming changes.
...
- Fix the bug with streaming an object that had a field typed as merely 'List'.
This will result in an incompatible change. Notably, BootstrapData has a List
field, but this shouldn't be accessed until after versions are checked.
The bug also meant that such fields could only hold an ArrayList. Now they
may hold any List type and will turn into an ArrayList on the other end...
- Support Map and Set streaming in the same way.
- Support using unmodifiedUTF if the "com.threerings.io.unmodifiedUTFStreaming"
system property is set to the String "true".
We can roll this back if it freaks something out, but I'd rather push forward.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6116 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-10 23:18:02 +00:00
Michael Bayne
5c7d59e597
This is so succinct now, we can dispense with the helper method altogether.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6115 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-10 22:09:33 +00:00
Michael Bayne
83c5fcfb15
Whoa, Daddy-O! This is almost like a real abstraction in Java.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6114 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-10 22:07:48 +00:00
Michael Bayne
89dfe715d8
Switch class to streamer mapping to a Map. Whoa! I used a linked hash map to
...
preserve the registration order, in case that's significant. It would be nice
if Guava had an ImmutableLinkedHashMap, but I don't see such a thing.
Thanks to my newly added unit tests, I'm pretty confident that I didn't just
fuck something up. Woo.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6113 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-10 22:04:05 +00:00
Charlie Groves
4ea22628f7
Generalize velocity creation and classloader setting for code generation ant tasks into GenTask
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6109 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-10 00:38:46 +00:00
Charlie Groves
1236121ff6
Add names to the builtin FieldMarshallers to make them differentiable when printed
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6108 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-09 22:23:32 +00:00
Charlie Groves
4e8c8bce3c
Comment fixes. Object[] is put in _marshallers as a wrapped BasicStreamer below, so don't act like
...
we're handling it with the generic marshaller.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6104 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-08 22:19:17 +00:00
Bruno Garcia
00a5e66f92
Style.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6103 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-03 02:48:42 +00:00
Ray Greenwell
7b86f2d8db
Prefer StringBuilder where possible.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6101 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-22 01:20:02 +00:00
Andrzej Kapolka
1bfc69aa49
Seems byte was only partially added here.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6100 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-20 01:11:55 +00:00
Ray Greenwell
73900f891d
Oh dear, fix already used variable name.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6099 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-19 18:08:54 +00:00
Ray Greenwell
353fdcd7cf
I'm trying to excise uses of com.samskivert.util.Collections, which is
...
full of some weird old stuff, much of it replaced by using Guava or newer
1.5 features.
Instead of using a "sorted iterator", slap the elements in a TreeSet.
Insertions are O(log n), and sorting an ArrayList would be O(n log n),
so it should be pretty much the same (TreeSet probably uses more memory).
Comments welcome.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6098 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-19 17:53:59 +00:00
Ray Greenwell
126ee1f738
Guavafication. A little ugly.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6097 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-16 01:19:36 +00:00
Dave Hoover
dc11108af4
Some tweaks to getTimeString.
...
First & easiest, no longer include zeros in our built-up string. It used to
say things like "3 days, 0 hours, 2 minutes, 0 seconds" if your minUnit was
seconds. Now we'll just tell you it's 3 days & 2 minutes.
Second, it used to (and still does, if you use the old-signature wrapper)
round DOWN to the nearest minUnit.
For example, 59 minutes, shown with minUnit of hours, would claim to be
0 hours. For some things (e.g. showing time remaining on a subscription), that
kind of pessimistic display is the safe approach. For other things
(e.g. come back in 0 hours and your temp ban is over), we'd rather err on the
side of saying TOO much time (e.g. telling someone their suspension will be
over in 2 hours when they really only need to wait 61 minutes)
There's other rework that I'm itching to do in this stuff, but no, let's just
give ourselves an option on this particular thing so we can clean up one thing
in yohoho and be done with it for now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6096 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-14 20:59:02 +00:00
Ray Greenwell
6bff220be7
Prefer java standard libraries, then guava, then samskivert.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6095 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-14 19:28:14 +00:00
Dave Hoover
cdebcfa71d
StringUtil.replace is deprecated
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6094 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-13 21:45:39 +00:00
Dave Hoover
3340e270ae
Whitespace
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6093 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-13 21:45:38 +00:00
Par Winzell
46835601af
Missing newline in report.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6091 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-02 13:32:49 +00:00
Mike Thomas
2f704712b2
I am of two minds whether this is the "right" way or not, but Eclipse's warnings sure think so. Since the generics portion has been erased we can only check against <?> but we at least are noting that it's a parameterized type.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6089 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-28 17:19:41 +00:00
Par Winzell
bf34448cdb
Grumble, allow Java5 its stingy @Override semantics.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6088 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-23 21:47:52 +00:00
Par Winzell
b6228a0dfe
There was already existing support for executing a NodeAction on all peers; this extends such support to NodeRequests, which have the additional property of taking a Listener, and thus being able to wait for the request to finish. For multiple peers, the requests are processed in parallel. If all the requests finish executing without error, the function reports success. If at least one node reports failure, so does the function.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6087 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-23 21:29:02 +00:00
Par Winzell
6971ce7d4d
There's no reason to demand an IntSet here.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6086 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-22 15:19:59 +00:00