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
Bruno Garcia
03ae523e62
Typo.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6102 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-29 20:35:45 +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
Dave Hoover
b8e029fdad
In with the new logging
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6092 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-09 23:33: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
4ddc60e369
Integer was getting envious of Short's MIN/MAX_VALUE constants, so let's appease it.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6090 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-01 20:17:52 +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
Charlie Groves
12578d8810
Gotta be symmetric with readField
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6085 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-22 03:16:23 +00:00
Charlie Groves
2268aae388
Handle primitive arrays
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6084 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-22 03:04:53 +00:00
Dave Hoover
3b266edcd6
That should be private.
...
If it's public, we try to shadow it in a subclass & wind up still
getting THIS one.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6083 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-18 23:40:16 +00:00
Dave Hoover
c54c82da55
Slay some cyclopian variables.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6082 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-15 17:26:29 +00:00
Dave Hoover
9b1624ced6
Whitespace
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6081 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-15 17:26:27 +00:00
Dave Hoover
0583a92100
Speeling
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6080 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-15 17:26:26 +00:00
Michael Bayne
5a02c42c21
Use our standard loop idioms.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6079 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-14 23:30:47 +00:00
Andrzej Kapolka
129023182c
Remove WeakListenerWrapper in favor of simply storing the WeakReference
...
directly in the array.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6078 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-14 20:12:16 +00:00
Andrzej Kapolka
06a7d265a7
Simplify the API by using a parameter to control whether we retain a weak or
...
strong reference to the listener.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6077 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-13 02:36:16 +00:00
Andrzej Kapolka
852c66497e
Allow adding/removing listeners by weak reference so as not to prevent
...
garbage collection.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6076 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-12 01:15:22 +00:00
Dave Hoover
b072941003
Whitespace
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6075 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-11 22:57:20 +00:00
Andrzej Kapolka
d7e5d3cf85
Broke out the places where we actually read from/write to the channels into
...
separate methods so that we can override them to do crazy stuff like simulate
latency/dropped packets for debugging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6072 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-09 03:27:27 +00:00
Mike Thomas
079269a825
Handle short[]'s on the actionscript side of streaming. This gets a little ugly given the lack of a primitive short on the actionscript side...
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6071 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-08 01:37:08 +00:00
Mike Thomas
7101012413
A new type of general communication between peers - the NodeRequest - it's a lot like a NodeAction but produces a result which is sent back via the ResultListener.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6070 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-01 23:48:50 +00:00
Andrzej Kapolka
3c2c86da60
Use the InetAddress obtained for the TCP socket for the datagram
...
channel as well, instead of re-resolving the hostname. This is because
we plan to use round-robin resolution for the game server, and I don't
want to chance getting different IPs for TCP and UDP.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6069 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-05-28 23:12:17 +00:00
Mike Thomas
f7a828e0c4
Move this convenience method up here to the ClientObject because it's... well... convenient.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6068 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-05-27 20:29:12 +00:00
Charlie Groves
4ab52e1c1e
Pull in imports from added methods and fields, and kill the extra space between fields
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6067 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-05-11 22:05:09 +00:00
Andrzej Kapolka
9043e99f7a
Separated TCP and UDP bind hostnames (we want to be able to bind to the
...
wildcard address for TCP in order to accept connections on both the
public hostname and the internal hostname used for peers, but bind to the
public hostname for UDP because binding to the wildcard address seems to
cause problems receiving packets).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6066 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-05-07 01:12:55 +00:00
Tom Conkling
45694bc0f0
This ActionScript constructor generator doesn't seem particularly useful, since it requires the developer to fill in the body
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6065 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-05-01 02:40:29 +00:00
Tom Conkling
f2f88f5e3c
Get rid of debugging code
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6064 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-05-01 02:37:31 +00:00
Tom Conkling
f4bc4a2680
- Properly parse out ActionScript member variables, and insert them back into the generated code
...
- Eclipse keeps rejiggering my imports
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6063 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-05-01 02:35:39 +00:00
Tom Conkling
98b63122d4
Properly handle getter and setter methods
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6062 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-05-01 00:38:34 +00:00
Mike Thomas
50fb782b03
Slightly scary change, but this makes Name more "correct" - Since equals() cares about the class of the Name and not just the normal string, make compareTo() care about that too. I've set it up so that the specific class of the Name has priority in the sort and thus all the "BuildingName" entries will group together.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6061 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-27 01:03:33 +00:00
Ray Greenwell
401e71fa51
Nixed this commented out alternate code.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6060 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-20 21:00:20 +00:00
Jamie Doornbos
19b6edcc98
Fix service generation for classes that use java.lang.Integer. Some day I will clean this up and fix the big TODO. It probably isn't actually that hard now I know more.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6059 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-19 18:58:54 +00:00
Ray Greenwell
406344529a
Updated deprecated usage.
...
Added alternate implementation in comments. One copies the array,
the other creates two wrapper Lists.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6058 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-13 21:00:52 +00:00
Ray Greenwell
b34cf47668
Whoops.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6056 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-07 21:24:06 +00:00
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
Dave Hoover
fefff841c3
Fix typoo
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6053 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-07 20:32:46 +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