List of usage examples for org.apache.commons.text StringTokenizer getTokenList
public List<String> getTokenList()
From source file:org.silverpeas.core.silverstatistics.volume.service.SilverStatisticsService.java
/** * @param type the statistic type (Access, Size, Volume, Connexion) * @param data the value to put in statistic *//* w ww. ja va2s. c o m*/ @Override public void putStats(StatType type, String data) { StringTokenizer stData = new StringTokenizer(data, SEPARATOR); List<String> dataArray = stData.getTokenList(); if (myStatsConfig.isGoodDatas(type, dataArray)) { try (Connection myCon = DBUtil.openConnection()) { SilverStatisticsDAO.putDataStats(myCon, type, dataArray, myStatsConfig); if (!myCon.getAutoCommit()) { myCon.commit(); } } catch (SQLException | StatisticsRuntimeException e) { SilverLogger.getLogger(this).error("typeOfStats={0}, dataArray={1}", new Object[] { type, dataArray }, e); } } else { SilverLogger.getLogger(this).error("input data={0} for {1}", data, type); } }