List of usage examples for java.util.concurrent ConcurrentHashMap ConcurrentHashMap
public ConcurrentHashMap()
From source file:ai.susi.mind.SusiReader.java
public SusiReader() { this.synonyms = new ConcurrentHashMap<>(); this.categories = new ConcurrentHashMap<>(); this.filler = new HashSet<>(); }
From source file:net.brtly.monkeyboard.adb.DeviceThreadPool.java
protected DeviceThreadPool() { _threads = new ConcurrentHashMap<String, ExecutorService>(); }
From source file:gr.upatras.ece.nam.baker.impl.BakerInstallationMgmt.java
public BakerInstallationMgmt() { managedInstalledBuns = new ConcurrentHashMap<>(); // this.setRepoWebClient(new RepositoryWebClient()); }
From source file:com.vmware.identity.idm.server.RsaAuthSessionCache.java
RsaAuthSessionCache() {
_rsaSessionCacheLookup = new ConcurrentHashMap<String, ConcurrentHashMap<String, AuthenticationSession>>();
}
From source file:net.openhft.chronicle.logger.jcl.ChronicleLoggerFactory.java
public ChronicleLoggerFactory() { logRawDiagnostic("[CHRONICLE] Initialize ChronicleLoggerFactory"); this.loggers = new ConcurrentHashMap<>(); this.manager = new ChronicleLogManager(); logRawDiagnostic("[CHRONICLE] ChronicleLoggerFactory initialized"); }
From source file:com.jivesoftware.os.upena.shared.User.java
@JsonCreator public User(@JsonProperty("name") String name, @JsonProperty("email") String email, @JsonProperty("permissions") Map<PermissionKey, Long> permissions) { this.name = name; this.email = email; if (permissions == null) permissions = new ConcurrentHashMap<>(); this.permissions = permissions; }
From source file:hivemall.mix.store.SessionStore.java
public SessionStore() { this.sessions = new ConcurrentHashMap<String, SessionObject>(); }
From source file:com.impetus.kundera.ejb.EntityManagerSession.java
/** * Instantiates a new entity manager cache. * * @param em// w w w . j a v a 2 s .c o m * the em */ public EntityManagerSession(EntityManagerImpl em) { this.em = em; this.sessionCache = new ConcurrentHashMap<Object, Object>(); }
From source file:com.clustercontrol.accesscontrol.util.SystemPrivilegePropertyUtil.java
private static void createSystemPrivilegeMap(String managerName) { if (managerName != null && managerName.length() > 0) { Map<String, SystemPrivilegeInfo> systemPrivilegeMap = m_systemPrivilegeAllMngMap.get(managerName); if (systemPrivilegeMap == null) { systemPrivilegeMap = new ConcurrentHashMap<>(); List<SystemPrivilegeInfo> systemPrivilegeInfoList = new ArrayList<>(); // ?? try { AccessEndpointWrapper wrapper = AccessEndpointWrapper.getWrapper(managerName); systemPrivilegeInfoList = wrapper.getSystemPrivilegeInfoListByEditType( PrivilegeConstant.SYSTEMPRIVILEGE_EDITTYPE_DIALOG); } catch (InvalidRole_Exception e) { // ??? MessageDialog.openInformation(null, Messages.getString("message"), Messages.getString("message.accesscontrol.16")); } catch (Exception e) { // ? m_log.warn("getOwnUserList(), " + HinemosMessage.replace(e.getMessage()), e); MessageDialog.openError(null, Messages.getString("failed"), Messages.getString("message.hinemos.failure.unexpected") + ", " + HinemosMessage.replace(e.getMessage())); }//from w w w.java 2 s.c o m // ?? for (SystemPrivilegeInfo systemPrivilegeInfo : systemPrivilegeInfoList) { systemPrivilegeMap.put(getSystemPrivilegeMessage(systemPrivilegeInfo), systemPrivilegeInfo); } // ? m_systemPrivilegeAllMngMap.put(managerName, systemPrivilegeMap); } } return; }
From source file:com.graph.bar.BarGraphData.java
public BarGraphData(String startDate, String endDate, String domain) { java.sql.Connection con = null; java.sql.PreparedStatement stmt = null; java.sql.ResultSet rs = null; try {//from w w w . j a v a 2s .co m con = ControlPanelPool.getInstance().getConnection(); stmt = con.prepareStatement(""); stmt = con.prepareStatement( "SELECT DISTINCT leadSession.referer, COUNT(leadSession.referer) as c FROM leadSession WHERE leadSession.timeIn > CONVERT(date, ?) AND leadSession.timeIn < CONVERT(date, ?) AND leadSession.referer != '' AND leadSession.referer is not null GROUP BY leadSession.referer HAVING COUNT(leadSession.referer) > 0"); stmt.setString(1, startDate); stmt.setString(2, endDate); rs = stmt.executeQuery(); refs = new ConcurrentHashMap<>(); while (rs.next()) { if (refs.containsKey(rs.getString("referer").split("/")[2])) { refs.put(rs.getString("referer").split("/")[2], refs.get(rs.getString("referer").split("/")[2]) + rs.getInt("c")); } else { refs.put(rs.getString("referer").split("/")[2], rs.getInt("c")); } } refs.put("Google", 0); refs.put("Yahoo", 0); refs.put("Bing", 0); refs.put("Other", 0); for (String key : refs.keySet()) { try { if (refs.get(key) != null && key.contains("google")) { refs.put("Google", refs.get("Google") + refs.get(key)); refs.remove(key); } if (refs.get(key) != null && key.contains("yahoo")) { refs.put("Yahoo", refs.get("Yahoo") + refs.get(key)); refs.remove(key); } if (refs.get(key) != null && key.contains("bing")) { refs.put("Bing", refs.get("Bing") + refs.get(key)); refs.remove(key); } //if (refs.get(key) != null && refs.get(key) < 6) { // refs.put("Other", refs.get("Other") + refs.get(key)); // refs.remove(key); //} if (refs.get(key) != null && key.contains(domain)) { //remove the self referred links refs.remove(key); } } catch (Exception e) { e.printStackTrace(); } } con.close(); } catch (IOException | SQLException | PropertyVetoException ex) { Logger.getLogger(BarGraphData.class.getName()).log(Level.SEVERE, null, ex); } finally { DbUtils.closeQuietly(con, stmt, rs); } }