/*
* Written by Doug Lea with assistance from members of JCP JSR-166
* Expert Group and released to the public domain, as explained at
* http://creativecommons.org/publicdomain/zero/1.0/
*/
package com.igix.frame.utils.concurrent.jsr166e;
import java.io.ObjectStreamField;
import java.io.Serializable;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.AbstractMap;
import java.util.Arrays;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.LockSupport;
import java.util.concurrent.locks.ReentrantLock;
/**
* http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/jsr166e/RecursiveTask.java 1.126
*
* A hash table supporting full concurrency of retrievals and
* high expected concurrency for updates. This class obeys the
* same functional specification as {@link java.util.Hashtable}, and
* includes versions of methods corresponding to each method of
* {@code Hashtable}. However, even though all operations are
* thread-safe, retrieval operations do <em>not</em> entail locking,
* and there is <em>not</em> any support for locking the entire table
* in a way that prevents all access. This class is fully
* interoperable with {@code Hashtable} in programs that rely on its
* thread safety but not on its synchronization details.
*
* <p>Retrieval operations (including {@code get}) generally do not
* block, so may overlap with update operations (including {@code put}
* and {@code remove}). Retrievals reflect the results of the most
* recently <em>completed</em> update operations holding upon their
* onset. (More formally, an update operation for a given key bears a
* <em>happens-before</em> relation with any (non-null) retrieval for
* that key reporting the updated value.) For aggregate operations
* such as {@code putAll} and {@code clear}, concurrent retrievals may
* reflect insertion or removal of only some entries. Similarly,
* Iterators and Enumerations return elements reflecting the state of
* the hash table at some point at or since the creation of the
* iterator/enumeration. They do <em>not</em> throw {@link
* ConcurrentModificationException}. However, iterators are designed
* to be used by only one thread at a time. Bear in mind that the
* results of aggregate status methods including {@code size}, {@code
* isEmpty}, and {@code containsValue} are typically useful only when
* a map is not undergoing concurrent updates in other threads.
* Otherwise the results of these methods reflect transient states
* that may be adequate for monitoring or estimation purposes, but not
* for program control.
*
* <p>The table is dynamically expanded when there are too many
* collisions (i.e., keys that have distinct hash codes but fall into
* the same slot modulo the table size), with the expected average
* effect of maintaining roughly two bins per mapping (corresponding
* to a 0.75 load factor threshold for resizing). There may be much
* variance around this average as mappings are added and removed, but
* overall, this maintains a commonly accepted time/space tradeoff for
* hash tables. However, resizing this or any other kind of hash
* table may be a relatively slow operation. When possible, it is a
* good idea to provide a size estimate as an optional {@code
* initialCapacity} constructor argument. An additional optional
* {@code loadFactor} constructor argument provides a further means of
* customizing initial table capacity by specifying the table density
* to be used in calculating the amount of space to allocate for the
* given number of elements. Also, for compatibility with previous
* versions of this class, constructors may optionally specify an
* expected {@code concurrencyLevel} as an additional hint for
* internal sizing. Note that using many keys with exactly the same
* {@code hashCode()} is a sure way to slow down performance of any
* hash table. To ameliorate impact, when keys are {@link Comparable},
* this class may use comparison order among keys to help break ties.
*
* <p>A {@link Set} projection of a ConcurrentHashMapV8 may be created
* (using {@link #newKeySet()} or {@link #newKeySet(int)}), or viewed
* (using {@link #keySet(Object)} when only keys are of interest, and the
* mapped values are (perhaps transiently) not used or all take the
* same mapping value.
*
* <p>This class and its views and iterators implement all of the
* <em>optional</em> methods of the {@link Map} and {@link Iterator}
* interfaces.
*
* <p>Like {@link Hashtable} but unlike {@link HashMap}, this class
* does <em>not</em> allow {@code null} to be used as a key or value.
*
* <p>ConcurrentHashMapV8s support a set of sequential and parallel bulk
* operations that are designed
* to be safely, and often sensibly, applied even with maps that are
* being concurrently updated by other threads; for example, when
* computing a snapshot summary of the values in a shared registry.
* There are three kinds of operation, each with four forms, accepting
* functions with Keys, Values, Entries, and (Key, Value) arguments
* and/or return values. Because the elements of a ConcurrentHashMapV8
* are not ordered in any particular way, and may be processed in
* different orders in different parallel executions, the correctness
* of supplied functions should not depend on any ordering, or on any
* other objects or values that may transiently change while
* computation is in progress; and except for forEach actions, should
* ideally be side-effect-free. Bulk operations on {@link java.util.Map.Entry}
* objects do not support method {@code setValue}.
*
* <ul>
* <li>forEach: Perform a given action on each element.
* A variant form applies a given transformation on each element
* before performing the action.
*
* <li>search: Return the first available non-null result of
* applying a given function on each element; skipping further
* search when a result is found.
*
* <li>reduce: Accumulate each element. The supplied reduction
* function cannot rely on ordering (more formally, it should be
* both associative and commutative). There are five variants:
*
* <ul>
*
* <li>Plain reductions. (There is not a form of this method for
* (key, value) function arguments since there is no corresponding
* return type.)
*
* <li>Mapped reductions that accumulate the results of a given
* function applied to each element.
*
* <li>Reductions to scalar doubles, longs, and ints, using a
* given basis value.
*
* </ul>
* </ul>
*
* <p>These bulk operations accept a {@code parallelismThreshold}
* argument. Methods proceed sequentially if the current map size is
* estimated to be less than the given threshold. Using a value of
* {@code Long.MAX_VALUE} suppresses all parallelism. Using a value
* of {@code 1} results in maximal parallelism by partitioning into
* enough subtasks to fully utilize the {@link
* ForkJoinPool#commonPool()} that is used for all parallel
* computations. Normally, you would initially choose one of these
* extreme values, and then measure performance of using in-between
* values that trade off overhead versus throughput.
*
* <p>The concurrency properties of bulk operations follow
* from those of ConcurrentHashMapV8: Any non-null result returned
* from {@code get(key)} and related access methods bears a
* happens-before relation with the associated insertion or
* update. The result
没有合适的资源?快使用搜索试试~ 我知道了~
springcloud微服务框架+服务模版
共1031个文件
xml:383个
class:280个
java:141个
需积分: 50 22 下载量 115 浏览量
2018-04-26
20:01:40
上传
评论 1
收藏 1.32MB RAR 举报
温馨提示
Spring Cloud使用的各种示例,以最简单、最实用为标准 spring-cloud-eureka:eureka server单机、双机、集群示例 eureka-producer-consumer:利用eureka实现服务提供与调用示例 spring-cloud-hystrix:Hystrix熔断的使用示例 hystrix-dashboard-turbine:熔断监控Hystrix Dashboard和Turbine的示例 spring-cloud-config-git:配置中心git版本示例 spring-cloud-config-svn-refresh:配置中心svn版本示例,客户端refresh版本示例 spring-cloud-config-eureka:配置中心服务化和高可用代码示例 spring-cloud-config-eureka-bus:配置中心和消息总线示例(配置中心终结版) gateway-service-zuul:Spring Cloud Zuul使用初级篇 网关 均衡负载 spring-cloud-zuul:Spring Cloud Zuul使用高级篇 Filter 鉴权 熔断 重试 spring-cloud-sleuth-zipkin: 利用Sleuth、Zipkin对Spring Cloud应用进行服务追踪分析 spring-boot-admin-eureka: 使用Spring Boot Admin 对Spring Cloud集群进行监控示例
资源推荐
资源详情
资源评论
收起资源包目录
springcloud微服务框架+服务模版 (1031个子文件)
0892c51ab898963fe76f0ca44428bee7f18d4a 834B
0d319dde2c486b8159465a3b24b8707de5e5e6 280B
1140f8a9ab9f7aeadc77a86bf2ba2f390aae20 172B
162e4dcea4b2de8d88b82e252fe5d73a52c032 45B
1724682bd25b92e58c7463a1642cbd237cf6f5 168B
18465359456a472d3af625babd434163256baf 80B
192a83e4ffe2980a4bbf1d311271117fe2229b 45B
1a44222d7f06bdd5ba936a9589033f0c07edb8 46B
1b3c123508d90f2a30c4841c0d27decdbb28cc 837B
22c852b5bcf9e62aac111568478e79a0ca4a92 117B
26a14558645dbd248f3d085713d7eefa7dcfe6 116B
284f87640a27db5ccde6c6f8a72ca1f8df7d21 46B
2888f4fcbc464831517572ed134fdf8c2916e0 116B
28b06ccfd9d5caf703c5ea114633a5ace56044 825B
2a1db53c1eeffa74294020b6f915861a924bac 79B
2dd5cb11806ee9e1524f0f9d7b52e5667e496f 68B
32bec2da49c62dacd67e59f9b86a5d96e85a39 1KB
32d67e2faf4c11367d480f82e2e07d02555f4e 46B
38db334f5e613d6277f2a82ee417d108ab5a5a 80B
3cea6ac8cc328bfb8d716a1817ce0cb81622e8 116B
3df4fdd0c3d991e815fbf5f30f00c805ea551f 116B
41a719b85f7c7939b8df3adbe41e636578042f 786B
491c07ebaa255f6fe8e65de2836e4c1bab2f95 81B
4d8a50182f9f268e92d36abc65c9d2d2bdc942 116B
4f0ecbf4ec52661c6ad3985918ba74000ea0f0 231B
4f1dac1e25f40e487204c3f2ec3cea91ea2240 47B
4fcab50a7e228c4020bd8b2134273018275a77 175B
512a1e6882146fbc0e1a83ce77f86cd753523c 125B
513b5159303a353fa56fe240060ab370f0a6c3 121B
5402bf499c374e41fe0c8a4710c84cd582b214 74B
542821861ce7c8f6fcc6a931455fc8e23dc9d1 122B
5590f52dea88c7069767bc16f6c87d313706ef 244B
576de340c818f3900d1bcfe095521d70ce9c79 116B
57f8c8e0c8f56fc6d8661d81793cfa13385354 610B
5a5faa695b67ca4cde17ea0c04291e55667df6 116B
5b131df2902047b57c3e677c83661c66984d93 712B
5ff6c49edc1d927a4c27e033877909de04673e 116B
609aa8e8c65cba1a636910d0827cfa3be7e241 91B
6283ab2b787e9f2c45902204dfcda3b502eea1 169B
65699864ab447520f446cfc29ec040648acb2d 140B
66dfb35193d1ebd1efa95bee247eb5fc27affa 46B
67f0314ded0459dbed080fb044ec10c32dfeeb 122B
6cd185270e36dd13a3584dabc0e2bc7d26b3a7 79B
6eae519a8b48c1cdf4dcbc9ebe91543de2831b 174B
6f4e9e0b29b1f10c43698247e70718f22ccde1 116B
6f79fac6dee2c627907df94ed2a16c49034834 45B
72163941d38ee68bdcaf7ebc104ebbcdadbf82 91B
72a74916f4199b385bd9d7eb75b5176a2377ed 122B
74e4f6492d7320987dfaab7c0c4d947b465bc3 91B
769fa810f57cee6213261e797d242132e8c769 79B
7888c863b0e2752a73f3de422d38b2a5b02aac 91B
7a94e7a24ec3c29653cc48539d7bc9f23051a3 91B
7dc7fe5f3ea5a487673b344e728554a6fde59c 165B
8168b60d341434c600c133051c5f1b3ad8fed3 91B
818ccbcf211baab172da0c74162f045cfaadf7 275B
82438dd0dc5620211f948dc5562e41b0a23acf 609B
8aeb5058d8d957ad3def277115b7819afadb79 207B
8c79361c4362b0a79f5df0b302db58edd2bb64 116B
90faf2619c393a99b74b47ffeec527c5d9c025 116B
91df09f6b8d169be7dd90bbd5ac9c32fb985a3 117B
943b1b4cd47521fc46c9e7d33f5b9b3eff7bee 170B
979e728902e0e93059b77e83d844236b4257e9 276B
98164651e5b812cc772d413aecdcf1c50fb11c 45B
9bc70563c18c8f93ddc2ae716c7d0c5667dbe2 74B
9e0052384b6a00cb015a51129eb2970421ce7f 74B
a5edc5e261b8ad7c6dc20b2a21b7dde8be673a 72B
a8206d51f002829bdea27a8daf2146426055bf 64B
ab5c1ae2ed84f480dd341c5e0bc63550f27056 1KB
ae8f9ca28131cb00cc960ae868f4957c2e81a8 79B
aec22682a3a2443c1afa57fea082b8cf770ef8 116B
b366cae42a1ee982bd57a6857d7a709d129b70 116B
b5d9bf1d5af9b451a9eb3d8318b58e60919f75 153B
b66c760ae58b8ca84c37acc9cd81e0685177ce 152B
b91f0825cd9b93d44e93bed5530bfb191a56c5 47B
ba53202e097ff67e30ad38d3f532aa8257abc5 116B
be6fe22f0c590e94858afd10250317f181cf8b 231B
c1654245a67d9f73beb46407e375ccefe7fe00 504B
c19a44f2bb7874396a0e82dec12d829262af60 613B
c1ccaaa5a3d1d63007d575ddd399f351308d7c 46B
c509304884448778269e77a1be53cde07ea7e0 1KB
c681e859c9501b8cb4fc7b90b343410ddae756 116B
c80724ecc566bf1eb400eb9309106d95c0b4a5 46B
c9b04684e7e346269df5890d5ab1be937f6413 122B
cea9fd98f05f94262927711a58a246d5d19a40 92B
ConcurrentHashMapV8.class 75KB
ForkJoinPool.class 42KB
ForkJoinTask.class 21KB
ConcurrentHashMapV8$TreeBin.class 13KB
ClassUtil.class 13KB
MapUtil.class 12KB
LongObjectHashMap.class 12KB
IntObjectHashMap.class 12KB
SpringDataRedisCache.class 11KB
ForkJoinPool$WorkQueue.class 11KB
ProductDto.class 10KB
ThrottledSlf4jLogger.class 9KB
FileUtil.class 8KB
ListUtil.class 8KB
SaveProductRequest.class 8KB
CustomOAuth2ExceptionRenderer.class 8KB
共 1031 条
- 1
- 2
- 3
- 4
- 5
- 6
- 11
资源评论
sadiea
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功