Commit Graph

80 Commits

Author SHA1 Message Date
Michael Bayne d05664f649 Added purgePlayers().
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@803 c613c5cb-e716-0410-b11b-feb51c14d237
2009-03-03 23:21:24 +00:00
Michael Bayne a8f4e9fc9b Updated to new Depot world order.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@797 c613c5cb-e716-0410-b11b-feb51c14d237
2009-01-08 02:10:42 +00:00
Michael Bayne a8421616f9 Avoid returning null from getCodeString() as it causes problems down the line.
Just return a string that is very unlikely to match an existing code.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@794 c613c5cb-e716-0410-b11b-feb51c14d237
2008-12-10 20:53:43 +00:00
Michael Bayne b1a74708f0 Varargs logging.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@791 c613c5cb-e716-0410-b11b-feb51c14d237
2008-12-09 19:29:18 +00:00
Michael Bayne c83064c2c2 Find Depot in its new home.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@781 c613c5cb-e716-0410-b11b-feb51c14d237
2008-11-16 07:46:19 +00:00
Dave Hoover 8b03be111e Imports cleanup
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@751 c613c5cb-e716-0410-b11b-feb51c14d237
2008-09-26 17:36:37 +00:00
Michael Bayne 8699c2c4c5 Load our string codes in init().
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@749 c613c5cb-e716-0410-b11b-feb51c14d237
2008-09-24 18:33:35 +00:00
Michael Bayne 961675157e Nixed unused imports.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@746 c613c5cb-e716-0410-b11b-feb51c14d237
2008-09-19 19:50:50 +00:00
Michael Bayne 722f867fa7 Grumble. Let's just make modified and modCount non-transient as that is
screwing us on Whirled when we move members' stat sets between servers. This
means Bang will be transmitting a couple of extra bytes per Stat instance down
to the client but I'd rather not have some way to make some kooky distinction
between when we're sending Stat instances between servers versus to a client.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@745 c613c5cb-e716-0410-b11b-feb51c14d237
2008-09-19 02:15:10 +00:00
Michael Bayne 4193ac8767 No longer need the cache invalidator for deleteAll(), also updated some logging
calls.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@744 c613c5cb-e716-0410-b11b-feb51c14d237
2008-09-19 02:12:45 +00:00
Michael Bayne 279f76a055 Include the modification count in our toString() output.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@743 c613c5cb-e716-0410-b11b-feb51c14d237
2008-09-19 01:55:50 +00:00
Dave Hoover 8b0488b3c9 Javadoc warnings cleanups.
Note: this involves generated code from a samskivert patch I only just sent to mdb,
but he's in a meeting, so that won't show up for a little.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@741 c613c5cb-e716-0410-b11b-feb51c14d237
2008-09-12 18:04:39 +00:00
Michael Bayne 36c3607585 Updated to use new DatabaseException.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@738 c613c5cb-e716-0410-b11b-feb51c14d237
2008-09-03 16:20:32 +00:00
Tom Conkling 8868835220 We're getting lots of collisions storing MINUTES_ACTIVE stats. Be more verbose when this happens.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@736 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-25 23:51:14 +00:00
Charlie Groves f862f5363f Javadoc fixery
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@735 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-21 01:52:03 +00:00
Tom Conkling ecafc0849c StatSet.addStat()/updateStat() need to know if they were called from syncStat() so that our ServerStatSet subclass that does sneaky badge-related stuff in msoy can do the right thing with regards to badge updating.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@733 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-20 01:30:04 +00:00
Nathan Curtis 85d7df6181 That last bit sounded good, so lets add it to the class docs. Also, fixed a copy/paste comment.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@732 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-16 00:14:48 +00:00
Nathan Curtis 95159a69d2 A StatModifier to ensure that an IntStat has been set to a minimum value. If the stat's value
is already greater than or equal to the minimum requested, the stat is not modified.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@731 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-16 00:13:38 +00:00
Tom Conkling e53c8aae20 Ok, now we're ready for this change
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@724 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-11 23:04:13 +00:00
Tom Conkling fa7b70c63e Undo a premature checkin. Not yet ready to commit the code that depends on this change.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@723 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-11 22:20:49 +00:00
Tom Conkling 7ee0c156b2 StatRepository.updateStat returns the new value of the Stat if it was modified, rather than a boolean
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@722 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-11 21:38:07 +00:00
Tom Conkling e1fa63562f undo
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@721 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-11 19:44:12 +00:00
Tom Conkling a983ca025a Add a constructor that takes a single Stat, for some msoy Passport code being worked on
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@720 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-11 19:26:12 +00:00
Michael Bayne be49dd45f1 Needs not Serializable nor @NotStreamable.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@719 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-10 01:23:28 +00:00
Tom Conkling b0d4ab9adb StatSet is no longer final, so that we can extend it for sneaky Whirled purposes
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@718 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-08 21:35:02 +00:00
Michael Bayne c5de0f2ccf More type jockeying.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@704 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-04 13:05:35 +00:00
Michael Bayne d6c55a091f Again, always on the variable, not the method.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@703 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-04 12:59:43 +00:00
Michael Bayne 12bd9e9db7 Be sure to use the logger from the appropriate package. However in this case,
let's not be checking in debug logging. Bang! Howdy calls these methods
hundreds of thousads of times a day and we don't really want the log spam.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@702 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-04 12:58:08 +00:00
Michael Bayne 299d63fd14 Always suppress unchecked warnings on an individual declaration plus
assignment, not an entire method. Eclipse is helpfully stupid about this, but
we'll just have to use our big brains and help it out.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@701 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-04 12:56:08 +00:00
Tom Conkling 3ac87296a6 StatModifier is Streamable, so that we can send stat updates from the game server to the world server
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@689 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-30 01:16:42 +00:00
Tom Conkling 31d855837a StatSet.updateStat -> StatSet.syncStat. syncStat() should be called after a stat has been successfully updated in the repository, to keep the in-memory version in sync with the repo changes.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@688 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-30 00:58:36 +00:00
Dave Hoover bcbe163a12 Prune unneeded imports, nuke some unneeded casts, rerun code generators.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@687 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-28 17:27:38 +00:00
Tom Conkling dd285192d9 missed one
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@685 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-25 22:52:37 +00:00
Tom Conkling 6e9a245db2 svn id keywords and Vilya preambles where appropriate
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@684 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-25 22:48:40 +00:00
Tom Conkling 6f8a1e0db0 - Created SetStat<T> generic type
- IntSetStat and StringSetStat extend SetStat
- consolidated SetStat-related functions in StatSet, and added StatSet.getSetStatSize()
- she sells SetStat StatSets by the seashore

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@683 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-25 22:48:13 +00:00
Tom Conkling 2a18ff5f02 switch on brain
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@682 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-25 21:01:07 +00:00
Tom Conkling bc38d2dde9 added StatSet.updateStat(), which uses a StatModifier to do its business
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@681 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-25 20:55:14 +00:00
Michael Bayne 32cec9c7d7 Blank line patrol.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@679 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-25 09:59:07 +00:00
Tom Conkling 1683eab1b5 Create the somewhat confusingly named MaxValueIntStat -- there's already a MaxIntStat here, which tracks the maximum value that the stat has been incremented by; MaxValueIntStat tracks the maximum value that the stat has ever attained.
Maybe these two classes should be merged into one? I'm worried that might break other code that already relies on MaxIntStat. Brighter minds: please advise.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@677 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-24 21:19:20 +00:00
Tom Conkling 25a657d7c6 apparently we already have a StreamableArrayIntSet; use that instead.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@676 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-24 20:11:41 +00:00
Tom Conkling 3c3146d381 fix IntSetStat so that it streams properly. i'm not able to test this code on my machine, so nate will test momentarily and we'll roll back if there are any issues.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@675 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-24 19:49:13 +00:00
Tom Conkling ae8ec1e2ac StatSet.addToSetStat, for IntSetStats
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@671 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-22 00:39:41 +00:00
Dave Hoover 624daadcd9 Nix unneeded imports, add @Overrides, remove content-free comments, and rerun code generators.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@670 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-18 19:02:08 +00:00
Michael Bayne f30cb74ace Create a notion of a StatModifier which encapsulates a change to a stat. Use
this to automatically retry colliding stat modifications in the repository.

We'll also use the StatModifier to package up and send the modification to the
server that is hosting a user's in-memory stats so that the same adjustment can
be made to those. As a result of this requirement, Stat.Type became
Serializable which means that Stat will probably also need to be serializable
because the pattern we've adopted for our Stat.Type implementationsn is for
them to contain a prototype Stat object which is cloned to create new stats.

Maybe we'll stick with that and make Stat serializable, or maybe we'll do
something else. Not sure yet.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@669 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-18 14:30:17 +00:00
Michael Bayne faa237b85d Use an ArrayIntSet instead of a HashSet<Integer> as it's way more memory
efficient (and almost certainly faster as well for sets of this size).

Modified add() to properly mark the stat as modified when it changes.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@668 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-18 13:21:15 +00:00
Michael Bayne 74d08d334f Use setModified() instead of modifying our value directly. That way it can be
overridden to intercept such things if necessary (it's not necesary in this
case, we're just trying to set a good example for future programmers).


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@667 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-18 13:15:38 +00:00
Michael Bayne d65967c57e Added class documentation.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@666 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-18 12:37:16 +00:00
Michael Bayne 4df7526d1a No need to use 'this.' to call methods in the same object. Converted
ByteArrayOutputStream to a byte[] once and use that in the three places it's
needed. Some other small formatting tweaks.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@665 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-18 12:34:21 +00:00
Tom Conkling 701eea2ad2 clarity
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@664 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-17 23:23:21 +00:00
Tom Conkling 728f0a6519 DepotRepository.updatePartial() expects column names, not ColumnExps
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@663 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-17 23:12:06 +00:00