Package java.util.concurrent.atomic

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);
    }
View Full Code Here


    final AtomicLongArray buckets;

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

                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

        }

        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

    }

    public EstimatedHistogram(int bucketCount)
    {
        makeOffsets(bucketCount);
        buckets = new AtomicLongArray(bucketOffsets.length + 1);
    }
View Full Code Here

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

    }

    public EstimatedHistogram(int bucketCount)
    {
        makeOffsets(bucketCount);
        buckets = new AtomicLongArray(bucketOffsets.length + 1);
    }
View Full Code Here

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

   * Creates a new UniformSample
   *
   * @param reservoirSize the number of samples to keep
   */
  public UniformSample(int reservoirSize) {
    this.values = new AtomicLongArray(reservoirSize);
    clear();
  }
View Full Code Here

    }

    public EstimatedHistogram(int bucketCount)
    {
        bucketOffsets = newOffsets(bucketCount);
        buckets = new AtomicLongArray(bucketOffsets.length + 1);
    }
View Full Code Here

TOP

Related Classes of java.util.concurrent.atomic.AtomicLongArray

Copyright © 2018 www.massapicom. 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.