[Megameknet-cvs] MegaMekNET/src/server/campaign CampaignMain.java,1.126,1.127
Status: Inactive
Brought to you by:
mcwizard
From: Immanuel S. <im...@us...> - 2005-04-11 20:19:25
|
Update of /cvsroot/megameknet/MegaMekNET/src/server/campaign In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29133/src/server/campaign Modified Files: CampaignMain.java Log Message: corrected synchronized. Index: CampaignMain.java =================================================================== RCS file: /cvsroot/megameknet/MegaMekNET/src/server/campaign/CampaignMain.java,v retrieving revision 1.126 retrieving revision 1.127 diff -C2 -d -r1.126 -r1.127 *** CampaignMain.java 11 Apr 2005 20:01:30 -0000 1.126 --- CampaignMain.java 11 Apr 2005 20:19:16 -0000 1.127 *************** *** 139,143 **** ServerDescriptionList serverDescriptions = new ServerDescriptionList(); ! LinkedList NewsFeed = new LinkedList(); //Hibernate --- 139,143 ---- ServerDescriptionList serverDescriptions = new ServerDescriptionList(); ! LinkedList newsFeed = new LinkedList(); //Hibernate *************** *** 654,658 **** } ! public void fromUser(String text, String userName) { if ((!isLoggedIn(userName)) && (text.toUpperCase().indexOf("ENROLL") == -1) --- 654,658 ---- } ! synchronized public void fromUser(String text, String userName) { if ((!isLoggedIn(userName)) && (text.toUpperCase().indexOf("ENROLL") == -1) *************** *** 1547,1551 **** * Gives influence to active players and adds busySlices to players engaged in tasks. */ ! public synchronized void slice() { //System.out.println("Slice Started"); --- 1547,1551 ---- * Gives influence to active players and adds busySlices to players engaged in tasks. */ ! synchronized public void slice() { //System.out.println("Slice Started"); *************** *** 1575,1579 **** }//end the slice... ! public synchronized void tick(boolean real, int tickid) { String result = ""; int totalstuff = 0; --- 1575,1579 ---- }//end the slice... ! synchronized public void tick(boolean real, int tickid) { String result = ""; int totalstuff = 0; *************** *** 1717,1721 **** System.gc(); } ! public boolean useHibernate() { boolean b = new Boolean(getConfig("Hibernate")).booleanValue(); --- 1717,1721 ---- System.gc(); } ! public boolean useHibernate() { boolean b = new Boolean(getConfig("Hibernate")).booleanValue(); *************** *** 1723,1727 **** } ! public TreeSet getHouseRanking() { /* The Planetary Control Way */ --- 1723,1727 ---- } ! public TreeSet getHouseRanking() { /* The Planetary Control Way */ *************** *** 1837,1841 **** * used to analyze statistiks over the last tasks done. */ ! synchronized public void addToTaskFeed(TaskInfo taskInfo) { /* try { --- 1837,1841 ---- * used to analyze statistiks over the last tasks done. */ ! public void addToTaskFeed(TaskInfo taskInfo) { /* try { *************** *** 1865,1871 **** } ! synchronized public void addToNewsFeed(String s) { ! NewsFeed.addLast(s); ! if (this.NewsFeed.size() > 200) this.NewsFeed.removeFirst(); try { --- 1865,1871 ---- } ! public void addToNewsFeed(String s) { ! newsFeed.addLast(s); ! if (this.newsFeed.size() > 200) this.newsFeed.removeFirst(); try { *************** *** 1882,1886 **** ps.println("</channel>"); ! for (Iterator it = NewsFeed.iterator(); it.hasNext();) { String entry = (String) it.next(); ps.println("<item>"); --- 1882,1886 ---- ps.println("</channel>"); ! for (Iterator it = newsFeed.iterator(); it.hasNext();) { String entry = (String) it.next(); ps.println("<item>"); *************** *** 2047,2052 **** } ! // Why synchronized? please comment. ! public synchronized int getAndUpdateCurrentUnitID(SUnit u){ if (useHibernate()) { UnitEntry entry; --- 2047,2051 ---- } ! public int getAndUpdateCurrentUnitID(SUnit u){ if (useHibernate()) { UnitEntry entry; |