org.apache.wicket.util.lang.Generics.newConcurrentHashMap()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中org.apache.wicket.util.lang.Generics.newConcurrentHashMap()方法的一些代码示例,展示了Generics.newConcurrentHashMap()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Generics.newConcurrentHashMap()方法的具体详情如下:
包路径:org.apache.wicket.util.lang.Generics
类名称:Generics
方法名:newConcurrentHashMap

Generics.newConcurrentHashMap介绍

[英]Creates a new ConcurrentHashMap
[中]创建新的ConcurrentHashMap

代码示例

代码示例来源:origin: apache/wicket

if (connectionsBySession == null)
    connectionsBySession = Generics.newConcurrentHashMap();
    application.setMetaData(KEY, connectionsBySession);
if (connectionsByPage == null)
  connectionsByPage = Generics.newConcurrentHashMap();
  ConcurrentMap<IKey, IWebSocketConnection> old = connectionsBySession.putIfAbsent(sessionId, connectionsByPage);
  if (old != null)

代码示例来源:origin: theonedev/onedev

if (connectionsBySession == null)
    connectionsBySession = Generics.newConcurrentHashMap();
    application.setMetaData(KEY, connectionsBySession);
if (connectionsByPage == null)
  connectionsByPage = Generics.newConcurrentHashMap();
  ConcurrentMap<IKey, IWebSocketConnection> old = connectionsBySession.putIfAbsent(sessionId, connectionsByPage);
  if (old != null)

代码示例来源:origin: org.apache.wicket/wicket-native-websocket-core

if (connectionsBySession == null)
    connectionsBySession = Generics.newConcurrentHashMap();
    application.setMetaData(KEY, connectionsBySession);
if (connectionsByPage == null)
  connectionsByPage = Generics.newConcurrentHashMap();
  ConcurrentMap<IKey, IWebSocketConnection> old = connectionsBySession.putIfAbsent(sessionId, connectionsByPage);
  if (old != null)

代码示例来源:origin: org.apache.wicket/wicket-core

@Override
public ResourceReference.UrlAttributes getUrlAttributes()
{
  Locale locale = getCurrentLocale();
  String style = getCurrentStyle();
  String variation = getVariation();
  ResourceReference.UrlAttributes key = new ResourceReference.UrlAttributes(locale, style,
    variation);
  if (urlAttributesCacheMap == null)
  {
    urlAttributesCacheMap = Generics.newConcurrentHashMap();
  }
  ResourceReference.UrlAttributes value = urlAttributesCacheMap.get(key);
  if (value == null)
  {
    value = getUrlAttributes(locale, style, variation);
    UrlAttributes tmpValue = urlAttributesCacheMap.putIfAbsent(key, value);
    if (tmpValue != null)
    {
      value = tmpValue;
    }
  }
  return value;
}

代码示例来源:origin: apache/wicket

@Override
public ResourceReference.UrlAttributes getUrlAttributes()
{
  Locale locale = getCurrentLocale();
  String style = getCurrentStyle();
  String variation = getVariation();
  ResourceReference.UrlAttributes key = new ResourceReference.UrlAttributes(locale, style,
    variation);
  if (urlAttributesCacheMap == null)
  {
    urlAttributesCacheMap = Generics.newConcurrentHashMap();
  }
  ResourceReference.UrlAttributes value = urlAttributesCacheMap.get(key);
  if (value == null)
  {
    value = getUrlAttributes(locale, style, variation);
    UrlAttributes tmpValue = urlAttributesCacheMap.putIfAbsent(key, value);
    if (tmpValue != null)
    {
      value = tmpValue;
    }
  }
  return value;
}

相关文章