java.util.concurrent.ConcurrentHashMap.toString()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(188)

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

ConcurrentHashMap.toString介绍

暂无

代码示例

代码示例来源:origin: google/guava

@Override
public String toString() {
 return map.toString();
}

代码示例来源:origin: prestodb/presto

@Override
public String toString() {
 return map.toString();
}

代码示例来源:origin: google/j2objc

@Override
public String toString() {
 return map.toString();
}

代码示例来源:origin: ben-manes/caffeine

@Override
public String toString() {
 return data.toString();
}

代码示例来源:origin: sohutv/cachecloud

@Override
public String toString() {
  return map.toString();
}

代码示例来源:origin: sohutv/cachecloud

@Override
public String toString() {
  return map.toString();
}

代码示例来源:origin: wildfly/wildfly

@Override
public String toString() {
 return map.toString();
}

代码示例来源:origin: alibaba/Tangram-Android

@Override
  public String toString() {
    return mSparseArray.toString();
  }
}

代码示例来源:origin: wildfly/wildfly

public String toString() {
  return backingMap.toString();
}

代码示例来源:origin: apache/incubator-dubbo

@Override
public String toString() {
  return "ExpiringMap{" +
      "delegateMap=" + delegateMap.toString() +
      ", expireThread=" + expireThread.toString() +
      '}';
}

代码示例来源:origin: apache/incubator-dubbo

@Override
public String toString() {
  return "ExpiringMap{" +
      "delegateMap=" + delegateMap.toString() +
      ", expireThread=" + expireThread.toString() +
      '}';
}

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

/** {@inheritDoc} */
  @Override public String toString() {
    return S.toString(GridDhtPreloaderAssignments.class, this, "exchId", exchangeId,
      "super", super.toString());
  }
}

代码示例来源:origin: alibaba/nacos

/**
 * This method will classify all servers as two kinds of servers: servers in the same site with local host and others
 *
 * @return servers
 */
public static ConcurrentHashMap<String, List<String>> getSameSiteServers() {
  refreshSrvSiteIfNeed();
  List<String> snapshot = servers;
  ConcurrentHashMap<String, List<String>> servers = new ConcurrentHashMap<>(2);
  servers.put("sameSite", snapshot);
  servers.put("otherSite", new ArrayList<String>());
  if (Loggers.SRV_LOG.isDebugEnabled()) {
    Loggers.SRV_LOG.debug("sameSiteServers: {}", servers.toString());
  }
  return servers;
}

代码示例来源:origin: AsyncHttpClient/async-http-client

/**
  * {@inheritDoc}
  */
 @Override
 public Map<String, Long> load() {
  Scanner scan = null;
  try {
   scan = new Scanner(new File(TMP, storeName), UTF_8.name());
   scan.useDelimiter("[=\n]");

   String key;
   String value;
   while (scan.hasNext()) {
    key = scan.next().trim();
    value = scan.next().trim();
    properties.put(key, Long.valueOf(value));
   }
   log.debug("Loading previous download state {}", properties.toString());
  } catch (FileNotFoundException ex) {
   log.debug("Missing {}", storeName);
  } catch (Throwable ex) {
   // Survive any exceptions
   log.warn(ex.getMessage(), ex);
  } finally {
   if (scan != null)
    scan.close();
  }
  return properties;
 }
}

代码示例来源:origin: AsyncHttpClient/async-http-client

/**
 * {@inheritDoc}
 */
@Override
public void save(Map<String, Long> map) {
 log.debug("Saving current download state {}", properties.toString());
 OutputStream os = null;
 try {
  if (!TMP.exists() && !TMP.mkdirs()) {
   throw new IllegalStateException("Unable to create directory: " + TMP.getAbsolutePath());
  }
  File f = new File(TMP, storeName);
  if (!f.exists() && !f.createNewFile()) {
   throw new IllegalStateException("Unable to create temp file: " + f.getAbsolutePath());
  }
  if (!f.canWrite()) {
   throw new IllegalStateException();
  }
  os = Files.newOutputStream(f.toPath());
  for (Map.Entry<String, Long> e : properties.entrySet()) {
   os.write(append(e).getBytes(UTF_8));
  }
  os.flush();
 } catch (Throwable e) {
  log.warn(e.getMessage(), e);
 } finally {
  closeSilently(os);
 }
}

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

/** this toString method is not thread-safe */
public String fullToString() {
 StringBuilder sb = new StringBuilder();
 sb.append("RegionVersionVector[").append(this.myId).append("={rv")
   .append(this.localExceptions.version).append(" gc" + this.localGCVersion)
   .append(" localVersion=" + this.localVersion);
 try {
  sb.append(" local exceptions=" + this.localExceptions.exceptionsToString());
 } catch (ConcurrentModificationException c) {
  sb.append(" (unable to access local exceptions)");
 }
 sb.append("} others=");
 String mbrVersions = "";
 try {
  mbrVersions = this.memberToVersion.toString();
 } catch (ConcurrentModificationException e) {
  mbrVersions = "(unable to access)";
 }
 sb.append(mbrVersions);
 if (this.memberToGCVersion != null) {
  try {
   mbrVersions = this.memberToGCVersion.toString();
  } catch (ConcurrentModificationException e) {
   mbrVersions = "(unable to access)";
  }
  sb.append(", gc=").append(mbrVersions);
 }
 sb.append("]");
 return sb.toString();
}

代码示例来源:origin: hibernate/hibernate-orm

public SessionFactory getSessionFactory(String uuid) {
  LOG.debugf( "Lookup: uid=%s", uuid );
  final SessionFactory sessionFactory = sessionFactoryMap.get( uuid );
  if ( sessionFactory == null && LOG.isDebugEnabled() ) {
    LOG.debugf( "Not found: %s", uuid );
    LOG.debugf( sessionFactoryMap.toString() );
  }
  return sessionFactory;
}

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

LOG.warn("Incorrect challenge: "
    + recChallenge + ", "
    + addrChallengeMap.toString());

代码示例来源:origin: alibaba/jstorm

LOG.info("notify nimbus that all tasks's status is: {} {} ", spoutsExecutorStatusMap.toString(),
    boltsExecutorStatusMap.toString());
if (client == null) {
  client = new NimbusClientWrapper();

代码示例来源:origin: org.apache.zookeeper/zookeeper

LOG.warn("Incorrect challenge: "
    + recChallenge + ", "
    + addrChallengeMap.toString());

相关文章