From aa43eac98bfdc7606e1119c6ac73149c29df187b Mon Sep 17 00:00:00 2001 From: Andy Janata Date: Sun, 3 May 2015 13:52:05 -0700 Subject: [PATCH] Repackage timer tasks. Add new timer task to broadcast game list updates every 60 seconds instead of every time a game changes (massive bandwidth use). Change chat rate limit from 5 per 10 sec to 6 per 30 sec. --- WebContent/cardsets.jsp | 2 + WebContent/game.jsp | 29 ++++-------- WebContent/index.jsp | 10 ++++ .../java/net/socialgamer/cah/Constants.java | 4 +- .../net/socialgamer/cah/StartupUtils.java | 22 ++++++++- .../java/net/socialgamer/cah/data/Game.java | 2 +- .../net/socialgamer/cah/data/GameManager.java | 47 +++++++++---------- .../cah/task/BroadcastGameListUpdateTask.java | 39 +++++++++++++++ .../cah/{ => task}/SafeTimerTask.java | 2 +- .../{UserPing.java => task/UserPingTask.java} | 16 ++++--- .../socialgamer/cah/data/GameManagerTest.java | 17 ++----- 11 files changed, 119 insertions(+), 71 deletions(-) create mode 100644 src/main/java/net/socialgamer/cah/task/BroadcastGameListUpdateTask.java rename src/main/java/net/socialgamer/cah/{ => task}/SafeTimerTask.java (91%) rename src/main/java/net/socialgamer/cah/{UserPing.java => task/UserPingTask.java} (88%) diff --git a/WebContent/cardsets.jsp b/WebContent/cardsets.jsp index 99b7396..6fe2d04 100644 --- a/WebContent/cardsets.jsp +++ b/WebContent/cardsets.jsp @@ -242,6 +242,7 @@ select { Delete Edit Weight + Active @@ -253,6 +254,7 @@ select { Delete Edit <%=cardSet.getWeight()%> + <%=cardSet.isActive()%> <% } diff --git a/WebContent/game.jsp b/WebContent/game.jsp index d048f02..20d688f 100644 --- a/WebContent/game.jsp +++ b/WebContent/game.jsp @@ -86,27 +86,16 @@ HttpSession hSession = request.getSession(true); If this is your first time playing, you may wish to read the changelog and list of known issues.

-

Most recent update: 21 February 2015:

+

Most recent update: 3 May 2015: