org.elasticsearch.common.util
Class BigLongArray

java.lang.Object
  extended by org.elasticsearch.common.util.BigLongArray

public class BigLongArray
extends Object

A GC friendly long[]. Allocating large arrays (that are not short-lived) generate fragmentation in old-gen space. This breaks such large long array into fixed size pages to avoid that problem.


Field Summary
 int size
           
 
Constructor Summary
BigLongArray(int size)
           
BigLongArray(int size, int pageSize)
           
 
Method Summary
 long get(int idx)
           
 void set(int idx, long value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

public final int size
Constructor Detail

BigLongArray

public BigLongArray(int size)

BigLongArray

public BigLongArray(int size,
                    int pageSize)
Method Detail

set

public void set(int idx,
                long value)

get

public long get(int idx)


Copyright © 2009-2012. All Rights Reserved.