@@ -0,0 +1,1276 @@
+package com.renren.Wario.plugin;%0A%0Aimport java.sql.SQLException;%0A%0Aimport com.renren.Wario.db.MySQLHelper;%0A%0Apublic class DBPlugin extends IPlugin %7B%0A%09private MySQLHelper helper = new MySQLHelper();%0A%09%0A%09@Override%0A%09public void run() %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09client.state.update();%0A%09%09%0A%09%09String sql = %22insert into ZKState (MinLatency, AveLatency, MaxLatency, Received, Sent, OutStanding, Zxid, Mode, NodeCount, TotalWatches, ClientNumber, TimeStamp) values (%22%0A%09%09%09%09+ client.state.getMinLatency()%0A%09%09%09%09+ %22, %22%0A%09%09%09%09+ client.state.getAvgLatency()%0A%09%09%09%09+ %22, %22%0A%09%09%09%09+ client.state.getMaxLatency()%0A%09%09%09%09+ %22, %22%0A%09%09%09%09+ client.state.getReceived()%0A%09%09%09%09+ %22, %22%0A%09%09%09%09+ client.state.getSent()%0A%09%09%09%09+ %22, %22%0A%09%09%09%09+ client.state.getOutStanding()%0A%09%09%09%09+ %22, '%22%0A%09%09%09%09+ client.state.getZxid()%0A%09%09%09%09+ %22', '%22%0A%09%09%09%09+ client.state.getMode()%0A%09%09%09%09+ %22', %22%0A%09%09%09%09+ client.state.getNodeCount()%0A%09%09%09%09+ %22, %22%0A%09%09%09%09+ client.state.getTotalWatches()%0A%09%09%09%09+ %22, %22%0A%09%09%09%09+ client.state.getClientNumber()%0A%09%09%09%09+ %22, %22%0A%09%09%09%09+ System.currentTimeMillis() + %22)%22;%0A%09%09%0A%09%09try %7B%0A%09%09%09helper.open();%0A%09%09%09helper.execute(sql);%0A%09%09%09helper.close();%0A%09%09%7D catch (SQLException e) %7B%0A%09%09%09// TODO Auto-generated catch block%0A%09%09%09e.printStackTrace();%0A%09%09%7D catch (ClassNotFoundException e) %7B%0A%09%09%09// TODO Auto-generated catch block%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

Add DBPlugin