Commit Graph

3964 Commits

Author SHA1 Message Date
Michael Bayne 63db77667a Some type safety, redundant cast removal, and other code hygiene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4879 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-24 19:40:19 +00:00
Dave Hoover 6eb2c79b19 Flag overrides in this template.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4878 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-21 19:16:05 +00:00
Mike Thomas aa418e19ee If the reboot time requested is at exactly the right time for the warning, we can use that warning and not require to go to the next level.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4877 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-20 18:26:31 +00:00
Michael Bayne 576dfa2c85 If a move fails and we're currently in a place, just stay where we are rather
than trying to go to our previous place. If we're no longer in a place (like we
switched servers to get where we're going), then we'll try to go back to our
previous place.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4875 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-15 01:59:22 +00:00
Michael Bayne 5ae87258fa If we lose our connection, let anyone who had a pending subscription request
outstanding know that their subscription request failed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4873 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-13 02:56:35 +00:00
Michael Bayne 8250d2f1f5 Let's be precise.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4872 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-12 21:32:19 +00:00
Michael Bayne f471da8a49 Let our peers send up to 100 messages a second after which point we will
politely complain that they're talking a lot but not disconnect them.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4871 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-12 21:29:57 +00:00
Michael Bayne ae6e8f1bdb We need to scan up the hierarchy so that if we're overriding a renamed method
(e.g toString(StringBuffer)) we use the properly renamed version
(e.g. toStringBuffer(StringBuffer)) when generating our ActionScript.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4870 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-12 19:37:08 +00:00
Michael Bayne b688776893 Allow createPlace() to be passed a list of delegates to be added to the place
manager prior to it being initialized or started up.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4869 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-10 05:01:02 +00:00
Michael Bayne abeeef4d10 PlaceManagerDelegate no longer takes its target manager in its constructor but
rather is configured with it when added to the manager as a delegate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4868 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-10 04:41:01 +00:00
Dave Hoover baa664bd11 channel is a SocketChannel which is a subclass of SelectableChannel, so this instanceof
can't ever be false. (And just above, we've already confirmed that channel != null, so this
check wasn't falling back to protecting us from that)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4867 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-08 18:49:28 +00:00
Michael Bayne 238da969c0 Don't build, just install the already committed build results.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4865 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-07 02:20:12 +00:00
Michael Bayne d84b2ac8a0 Report a more useful error if we have a bogus controller. Tidied some other
bits up.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4861 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-02 23:02:36 +00:00
Dave Hoover 6719d18caa Rerun generators.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4857 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-26 21:06:53 +00:00
Michael Bayne e6af23ad38 Let's report that in a friendlier way.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4855 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-26 17:41:24 +00:00
Michael Bayne 13fe8fc930 On second thought, reference equality is really the only appropriate thing for
DObject. There will never be multiple instances with the same oid that
represent "equal" objects and it's possible that in certain (controlled and
limited) cirumstances, objects with different object managers might have the
same oid even though they are different objects.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4853 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-20 18:50:27 +00:00
Michael Bayne 4280391d03 Implemented hashCode() and equals() as it could come in handy if we want to
stick objects in a collection.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4852 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-20 18:48:06 +00:00
Michael Bayne 4f83cf0119 Added a backwards compatible registerDispatcher() call to repair GG games.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4851 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-19 23:16:52 +00:00
Michael Bayne 27b95dd19a Nix another redundant cast.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4850 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-19 18:28:56 +00:00
Michael Bayne 66660bc490 Don't need to cast the result of an array clone.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4849 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-19 18:22:37 +00:00
Michael Bayne a2af35fcfd Log a warning rather than NPEing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4847 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-18 18:49:52 +00:00
Charlie Groves 45034b895e Reference the client immediately rather than on the dobjmgr thread so it doesn't get released before we tell the listener it's resolved.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4842 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-10 02:01:48 +00:00
Michael Bayne 466ae35688 Proper Long handling and checking for @ActionScript(omit=true) up the
superclass chain. Other such annotation "inheritance" is needed for methods,
but that I'll do later.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4840 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-09 01:52:22 +00:00
Michael Bayne 8f81893a0c getFailureMessage() should be protected as it's not part of the persisting
unit's public API.

handleResult() and handleFailure() could also be protected but we're adapting
Invoker.Unit to something that appears to provide a different (persistence
friendly) public API even though the invoker doesn't actually call it, but
rather the normal Unit public methods call the new public methods. But we still
want to maintain the "feel" of these being the PersistingUnit's "main thing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4839 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-08 23:55:51 +00:00
Michael Bayne d4562ff806 Allow external parties to call applyToDelegates().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4838 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-02 23:29:02 +00:00
Michael Bayne 13c2173829 Don't need two of these fellers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4837 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-02 00:09:13 +00:00
Michael Bayne 4cc4c3c9f1 Use the bare BlockingCommunicator in the PeerNode instead of the
ClientCommunicator which does stuff like try to save its preferred connection
port using the Java preference system (which is no longer available to server
processes due to the removal of their home directories).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4836 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-01 23:47:02 +00:00
Michael Bayne ab632ffe83 Refactored communicator so that we can not do some things in the peer client
(which runs on the server) that we do in a normal client (which runs on a
user's computer). Eventually we'll make a custom Communicator for use on the
server that integrates with the ConnectionManager's polled socket I/O which
will be easier now that this bit of factoring has been done.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4835 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-01 23:44:31 +00:00
Michael Bayne 120d641dea Comment rearranging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4834 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-01 21:26:27 +00:00
Mark Johnson 1ec7f25ea6 Refreshing the peers seems to often take just over 500ms, so increase the time we wait before logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4833 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-28 23:26:42 +00:00
Mike Thomas b3678b086d The client manager was busy registering client objects on the ConnectionManager thread rather than the dobj thread. Give it a nudge in the right direction.
Also, added logging to the PresentsDObjectMgr to check for this type of thing and dump stack if anyone is trying to register objects anywhere but the DObj thread (assuming we're sufficiently far started up that there is one).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4832 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-28 18:35:20 +00:00
Michael Bayne 873eede988 Log a message when we drop a forced move request due to a pending move.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4831 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-24 20:47:17 +00:00
Michael Bayne 6904c467bf Identify ourselves if we turn out to be a long dobj unit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4830 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-24 17:23:02 +00:00
Michael Bayne 400a42930b Return the correct value if we're asked for this node's public hostname or
port.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4829 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-20 01:49:56 +00:00
Michael Bayne c0ead54dbe Dispatch our client tick on the RunQueue so that it doesn't end up running on a
separate thread and racing against other client actions. Also nixed a pointless
type check and cast.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4828 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-19 03:35:17 +00:00
Michael Bayne 93c89fe0a7 Be sure that we always dispatch subscription responses (success or failure) on
the dobjmgr thread to relieve the caller of the burden of knowing what thread
they are on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4826 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-14 18:17:50 +00:00
Mike Thomas e4cb816fba This is being called on other-than-the-DObject thread, and we really don't want to be posting messages directly outside that thread.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4825 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-14 17:58:54 +00:00
Dave Hoover 59a65e9ef2 We're waiting to hear that our PlaceObject has been destroyed so we can
call didShutdown, so we can't stop listening to it until then.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4824 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-13 21:38:01 +00:00
Michael Bayne e71fed20c3 Clear out our PlaceManager listenerships when we shutdown to ensure that the
manager can be collected even if the object lingers about for a while and
because it sets a good example.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4823 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-11 22:20:28 +00:00
Michael Bayne bc739b6520 Clear out our speak service once we've unregistered it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4822 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-11 19:59:08 +00:00
Michael Bayne 9f2a90f001 Implement Comparable<Name>. The old compareTo() did funny things if a Name was
being compared with a non-Name but I'm almost certain that never happened and
was just Ray being kooky.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4821 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-10 17:34:53 +00:00
Michael Bayne 810969f6f9 Pass a message along with a FailureResponse.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4819 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-22 01:15:39 +00:00
Michael Bayne 9a150ebcda Some widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4818 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-22 01:12:02 +00:00
Michael Bayne 52be62ddbf Added a helper method for calling an invocation service method on one or more
remote nodes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4817 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-17 21:02:44 +00:00
Michael Bayne d92f81af78 Crowd peer services now forward broadcasts as well as tells. We must get the
word to the people, all the people.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4816 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-16 22:38:40 +00:00
Par Winzell 3204cc6266 We're not going to do this INDEX: comment thing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4815 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-16 21:53:53 +00:00
Michael Bayne f90a39207f Created a peer-aware DatabaseConfigRegistry that broadcasts changed runtime
configuration information to other peers so that they all remain in sync.

Also nixed constructor arguments to the peer manager so that it can be created
at server construct time like all other managers and be available for the
twisty maze of inter-registration that takes place during the manager init
process.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4814 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-16 20:53:17 +00:00
Michael Bayne b18ebdbc53 Whitespace trimming.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4813 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-16 18:33:45 +00:00
Michael Bayne f80495f906 Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4812 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-16 18:25:46 +00:00
Robert Zubeck 77ef41cb42 Separated out chat message listener functionality, and subsequent chat message
processing. This enables subclasses of ChatDirector to listen for their own
types of chat messages, but call the superclass to process them.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4810 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-10 20:33:03 +00:00