Examples of AtomicLongArray


Examples of java.util.concurrent.atomic.AtomicLongArray

      throws java.io.IOException, ClassNotFoundException {
    s.defaultReadObject();

    // Read in array length and allocate array
    int length = s.readInt();
    this.longs = new AtomicLongArray(length);

    // Read in all elements in the proper order.
    for (int i = 0; i < length; i++) {
      set(i, s.readDouble());
    }
View Full Code Here

Examples of java.util.concurrent.atomic.AtomicLongArray

    }

    public EstimatedHistogram(int bucketCount)
    {
        makeOffsets(bucketCount);
        buckets = new AtomicLongArray(numBuckets);
    }
View Full Code Here

Examples of java.util.concurrent.atomic.AtomicLongArray

    public EstimatedHistogram(long[] offsets, long[] bucketData)
    {
        assert bucketData.length == offsets.length +1;
        bucketOffsets = offsets;
        buckets = new AtomicLongArray(bucketData);
        numBuckets = bucketData.length;
    }
View Full Code Here

Examples of java.util.concurrent.atomic.AtomicLongArray

        mean  = numKeys / 2;
        sigma = numKeys * STDev;

        operationCount = new AtomicIntegerArray(threads);
        keyCount = new AtomicIntegerArray(threads);
        latencies = new AtomicLongArray(threads);
    }
View Full Code Here

Examples of java.util.concurrent.atomic.AtomicLongArray

                out.writeNull();
            }
            return;
        }

        AtomicLongArray array = (AtomicLongArray) object;
        int len = array.length();
        out.append('[');
        for (int i = 0; i < len; ++i) {
            long val = array.get(i);
            if (i != 0) {
                out.write(',');
            }
            out.writeLong(val);
        }
View Full Code Here

Examples of java.util.concurrent.atomic.AtomicLongArray

        }

        JSONArray array = new JSONArray();
        parser.parseArray(array);

        AtomicLongArray atomicArray = new AtomicLongArray(array.size());
        for (int i = 0; i < array.size(); ++i) {
            atomicArray.set(i, array.getLong(i));
        }

        return (T) atomicArray;
    }
View Full Code Here

Examples of java.util.concurrent.atomic.AtomicLongArray

    }

    public EstimatedHistogram(int bucketCount)
    {
        makeOffsets(bucketCount);
        buckets = new AtomicLongArray(numBuckets);
    }
View Full Code Here

Examples of java.util.concurrent.atomic.AtomicLongArray

    }

    public EstimatedHistogram(long[] bucketData)
    {
        makeOffsets(bucketData.length - 1);
        buckets = new AtomicLongArray(bucketData);
    }
View Full Code Here

Examples of java.util.concurrent.atomic.AtomicLongArray

   
    /**
     * The constructor for creating a Bins without any prior data.
     */
    public Bins() {
      this.counts = new AtomicLongArray(4);
      this.binsMin = 0L;
      this.binsMax = Long.MAX_VALUE;
      this.bins10XMax = Long.MAX_VALUE;
    }
View Full Code Here

Examples of java.util.concurrent.atomic.AtomicLongArray

      long binsMax = (long) (values[1] + wd * (1 - maxQ)) + 1;
      // make sure each of bins is at least of width 1
      this.binsMax = Math.max(binsMax, this.binsMin + numOfBins);
      this.bins10XMax = Math.max((long) (values[1] + (binsMax - 1) * 9), this.binsMax + 1);

      this.counts = new AtomicLongArray(numOfBins + 3);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.