Commit Graph

5828 Commits

Author SHA1 Message Date
Jamie Doornbos 5d8a93632e Allow callers to detect when a client is about to die even though it is connected and logged on. This allows handling of the edge case where a client is getting throttled.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5897 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-08-05 22:12:16 +00:00
Andrzej Kapolka 4dc85174ba Fix for NPE in closing datagram channel.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5896 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-08-04 19:41:01 +00:00
Mike Thomas 5099dc9d96 Mark run() as an override since it is.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5895 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-08-04 18:23:55 +00:00
Michael Bayne c3e31440ab Comment some fiddliness.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5894 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-08-04 16:48:21 +00:00
Michael Bayne 9ce8a7ac71 Moved our peer-aware cron service into Presents from MSOY.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5893 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-08-01 23:01:40 +00:00
Michael Bayne d0d5c2805e StringUtil got moved to flash-utils.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5892 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-30 21:55:40 +00:00
Michael Bayne c0499674e9 Allow an InvocationListener interface to extend another InvocationListener
interface. The way this works is a little tricky, but it all works out.

We have a service SceneService with SceneMoveListener declaration. You can make
FooSceneService and have a method in that service take a FooMoveListener which
extends SceneMoveListener. An instance of FooMoveMarshaller will only be
created if you call the method on FooSceneService and that will result in an
object on the server side that implements SceneMoveListener, but calls to the
SceneMoveListener response methods will result in the FooSceneService response
codes being marshalled and sent back to the caller.

So you can pass the FooMoveListener around to code on the server that expects a
SceneMoveListener and it will magically do the right thing when server code
calls through the SceneMoveListener interface. You can even turn around and
pass the FooMoveMarshaller to another invocation service method (on a peer
perhaps) that takes SceneMoveListener and it will work because the SceneService
call will generate a SceneMoveMarshaller on the remote server, which will use
the SceneMoveMarshaller's codes to communicate the response back to the first
peer, which will unmap those and call the methods on the SceneMoveListener
interface which will remarshal them with the FooMoveListener's codes and send
them back to the client, and bob is everyone's uncle.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5891 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-28 21:34:13 +00:00
Charlie Groves 5dc71a9b8e Preserve varargs in generated marshallers and providers to keep Eclipse from getting in a snit about it
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5890 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-24 23:39:35 +00:00
Michael Bayne 805ef99374 Various utility classes moved to flash-utils.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5889 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-21 20:56:35 +00:00
Jamie Doornbos f005c3e3a8 Removed unused imports
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5888 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-21 14:56:04 +00:00
Michael Bayne a6478daf0f That ended up being called PresentsTestBase.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5887 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-21 00:33:18 +00:00
Michael Bayne ff3c59799b No longer need atunit.jar.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5886 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-21 00:30:16 +00:00
Michael Bayne 5985d4086a Added a unit test for shutting down intervals when the omgr shuts down.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5885 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-21 00:29:56 +00:00
Michael Bayne 9d93ea7a90 Nixed our ATUnit dependency which wasn't working. Better that we just do the
Guicing we need ourselves.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5884 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-21 00:29:37 +00:00
Charlie Groves 0cd0a67679 Include the Runnable's toString in the toString of Intervals created by PresentsDObjectMgr
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5883 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-20 23:57:24 +00:00
Michael Bayne c82c8bdf9b We need to cancel ourselves before we're posted to the RunQueue and in order to
preserve Interval's behavior of not executing an interval that was canceled
after it was posted to its runqueue but before it was executed we have to do
some nested craziness.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5882 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-20 23:50:19 +00:00
Michael Bayne 8c2a1d9b37 Factor out our report interval specification so that Yohoho can change it
without hackery.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5881 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-20 22:58:39 +00:00
Michael Bayne c0c68f98d3 Added RootDObjectManager.newInterval() for creating intervals that are
automatically canceled when the omgr is shutdown (they actually cancel
themselves if they fire after the omgr has been shutdown, which stock intervals
also do, but these guys do so quietly because we know they mean to work that
way).

Made use of that new method and the fluent schedule methods in various places.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5880 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-20 22:43:00 +00:00
Dave Hoover 57b630727e Unused import
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5879 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-20 21:37:15 +00:00
Michael Bayne db2ef0f8f0 Judging by this method from RMISynchronousCacheReplicator:
static List listRemoteCachePeers(Ehcache cache) {
        CacheManagerPeerProvider provider =
        cache.getCacheManager().getCacheManagerPeerProvider("RMI");
        return provider.listRemoteCachePeers(cache);
    }

we need to return "RMI" from getScheme(). Zell can confirm that we are meant to
work with the RMISynchronousCacheReplicator but the repeated freakoutey stack
traces in the log incline me to believe so.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5878 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-18 00:55:50 +00:00
Michael Bayne 7e8a42487d Only return cache information on the cache requested.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5877 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-17 22:26:57 +00:00
Tom Conkling eceae381af Move ObjectSet to narya from contrib
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5876 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-17 18:58:45 +00:00
Tom Conkling 7e5f28042f I thought I compiled this before committing but apparnetly not
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5875 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-17 18:44:34 +00:00
Tom Conkling d4c3964b22 ObjectMap
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5874 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-17 18:37:38 +00:00
Ray Greenwell b4599943c8 Bugfix: return to correct functioning behavior, with added
functional fun, which is what mdb probably intended.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5873 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-14 20:36:14 +00:00
Dave Hoover ef600104e4 Unused import patrol
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5872 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-13 17:22:04 +00:00
Michael Bayne 31eda1cfc9 Let's do that *after* we've checked sochan for nullity.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5871 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-13 02:12:57 +00:00
Michael Bayne 0cf6b6199e Don't try writing overflow messages for an outgoing connection that is still
waiting to connect.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5870 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-13 02:12:24 +00:00
Michael Bayne 231edfa66e applyToNodes() is superfluous now that we have getNodeObjects().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5869 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-13 00:59:32 +00:00
Michael Bayne 047dd3b871 Sprinkled some functional programming onto node object handling.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5868 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-13 00:55:03 +00:00
Michael Bayne 9cdd93ee11 Publish our server startup time in our NodeObject.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5867 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-13 00:34:19 +00:00
Michael Bayne 646b438404 We need commons-collections as well for our velocity-using tools.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5866 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-13 00:29:59 +00:00
Michael Bayne c6ba34a129 You'd think that calling isConnectionPending() would return true on a channel
that would throw a NotYetConnectedException when you tried to write to it. Yes,
you'd definitely think that.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5865 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-13 00:22:24 +00:00
Michael Bayne 4bcc8ab7c4 Less spammy ant task error reporting, further narya-tools dependencies.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5864 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-12 22:19:22 +00:00
Michael Bayne f7152e9ac6 Throw a build exception if Velocity freaks out.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5863 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-12 22:05:39 +00:00
Michael Bayne 1e2b48deb2 Shorten the property file name.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5862 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-12 22:02:49 +00:00
Michael Bayne 1e5b1e5a7f Place all of our tools into narya-tools along with all of their dependencies.
Provide an ant properties file that defines all of our tasks in one fell swoop.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5861 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-12 22:00:36 +00:00
Michael Bayne e9f3d53a76 Nix commons dependencies.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5860 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-12 21:14:37 +00:00
Ray Greenwell 83ce3f004e Added ByteEnum interface to ActionScript, and ByteEnumUtil.
Use this if you want your enums to persist to a byte reliably.
Coming soonesque: narya streaming support for ByteEnum.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5859 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-11 00:08:41 +00:00
Ray Greenwell 6dbdf8d413 Killed fromOrdinal().
Not available in Java, and generally a bad idea.
Pretend ordinal() doesn't exist, unless you're writing EnumSet, or something.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5858 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-11 00:06:23 +00:00
Tom Conkling 10c1da22bd case-insensitive String comparison util
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5857 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-10 20:24:45 +00:00
Michael Bayne 6d740bf7b3 Truth in commenting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5856 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-10 06:31:49 +00:00
Michael Bayne 95bae1dec8 We need to distinguish between a connection that is still pending (which may be
the case for an outgoing connection since we do our connection asynchronously)
and a connection that is no longer connected because it once was open and now
it's closed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5855 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-10 06:30:41 +00:00
Charlie Groves 266595e2a0 Disallow access to atunit/lib/com/google in atunit.jar
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5854 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-08 21:06:48 +00:00
Charlie Groves 03408cbda8 Don't allow the dummy DObject to be destroyed. That shouldn't happen in the normal course of
operations, but previously if someone called destroy on an uninitialized DObject or called
PresentsDObjectManager.destroyObject with its oid, it'd be destroyed.  Subscribing to objects
depends on that object existing, so if it's destroyed, the server will continue to function normally
except that subscription requests will be silently dropped.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5851 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-05 23:18:51 +00:00
Tom Conkling c260457c6e Whoops
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5850 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-04 23:06:07 +00:00
Tom Conkling 95a159016f Utility function for converting from ordinal to Enum
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5849 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-04 22:48:21 +00:00
Charlie Groves 21712c5883 Just say it
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5848 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-04 00:07:22 +00:00
Michael Bayne c835698e9f We can't inject the PresentsDObjectMgr because that causes a circular
dependency, but we can inject RunQueue which will Guice will magically defer to
avoid the circularity.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5847 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-03 23:26:00 +00:00
Michael Bayne 4731294773 Instead of having to disable the periodic server reports with a cumbersome
specialized ReportManager, let's just not activate them by default.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5846 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-03 23:09:04 +00:00