欢迎光临散文网 会员登陆 & 注册

马老师Kubernetes原生配置管理 Kustomize

2022-10-07 23:43 作者:血霁玫瑰与樱花  | 我要投稿

final V putVal(K key, V value, boolean onlyIfAbsent) {    // key 和 value 不能为空    if (key == null || value == null) throw new NullPointerException();    int hash = spread(key.hashCode());    int binCount = 0;    for (Node<K,V>[] tab = table;;) {        // f = 目标位置元素        Node<K,V> f; int n, i, fh;// fh 后面存放目标位置的元素 hash 值        if (tab == null || (n = tab.length) == 0)            // 数组桶为空,初始化数组桶(自旋+CAS)            tab = initTable();        else if ((f = tabAt(tab, i = (n - 1) & hash)) == null) {            // 桶内为空,CAS 放入,不加锁,成功了就直接 break 跳出            if (casTabAt(tab, i, null,new Node<K,V>(hash, key, value, null)))                break;  // no lock when adding to empty bin        }



马老师Kubernetes原生配置管理 Kustomize的评论 (共 条)

分享到微博请遵守国家法律