Created
June 22, 2012 19:02
-
-
Save tehbeard/2974537 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(PlayerStatBlob pb : writeCache.values()){ | |
try { | |
prepSetPlayerStat.clearBatch(); | |
for(PlayerStat ps : pb.getStats()){ //ConcurrentModificationException here | |
prepSetPlayerStat.setString(1, pb.getName()); | |
prepSetPlayerStat.setString(2, ps.getCat()); | |
prepSetPlayerStat.setString(3, ps.getName()); | |
prepSetPlayerStat.setInt(4, ps.getValue()); | |
prepSetPlayerStat.setInt(5, ps.getValue()); | |
prepSetPlayerStat.addBatch(); | |
} | |
prepSetPlayerStat.executeBatch(); | |
BeardStat.printDebugCon("Saved."); | |
} catch (SQLException e) { | |
// TODO Auto-generated catch block | |
e.printStackTrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment