|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.accumulo.core.file.blockfile.cache.ClassSize
public class ClassSize
Class for determining the "size" of a class, an attempt to calculate the actual bytes that an object of this class will occupy in memory The core of this class is taken from the Derby project
Field Summary | |
---|---|
static int |
ARRAY
Array overhead |
static int |
ARRAYLIST
Overhead for ArrayList(0) |
static int |
ATOMIC_BOOLEAN
Overhead for AtomicBoolean |
static int |
ATOMIC_INTEGER
Overhead for AtomicInteger |
static int |
ATOMIC_LONG
Overhead for AtomicLong |
static int |
BYTE_BUFFER
Overhead for ByteBuffer |
static int |
CONCURRENT_HASHMAP
Overhead for ConcurrentHashMap |
static int |
CONCURRENT_HASHMAP_ENTRY
Overhead for ConcurrentHashMap.Entry |
static int |
CONCURRENT_HASHMAP_SEGMENT
Overhead for ConcurrentHashMap.Segment |
static int |
CONCURRENT_SKIPLISTMAP
Overhead for ConcurrentSkipListMap |
static int |
CONCURRENT_SKIPLISTMAP_ENTRY
Overhead for ConcurrentSkipListMap Entry |
static int |
COPYONWRITE_ARRAYLIST
Overhead for CopyOnWriteArrayList |
static int |
COPYONWRITE_ARRAYSET
Overhead for CopyOnWriteArraySet |
static int |
INTEGER
Overhead for an Integer |
static int |
MAP_ENTRY
Overhead for entry in map |
static int |
OBJECT
Object overhead is minimum 2 * reference size (8 bytes on 64-bit) |
static int |
REENTRANT_LOCK
Overhead for ReentrantReadWriteLock |
static int |
REFERENCE
Reference size is 8 bytes on 64-bit, 4 bytes on 32-bit |
static int |
STRING
String overhead |
static int |
TREEMAP
Overhead for TreeMap |
Constructor Summary | |
---|---|
ClassSize()
|
Method Summary | |
---|---|
static int |
align(int num)
Aligns a number to 8. |
static long |
align(long num)
Aligns a number to 8. |
static long |
estimateBase(Class<?> cl,
boolean debug)
Estimate the static space taken up by the fields of a class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int ARRAY
public static int ARRAYLIST
public static int BYTE_BUFFER
public static int INTEGER
public static int MAP_ENTRY
public static int OBJECT
public static int REFERENCE
public static int STRING
public static int TREEMAP
public static int CONCURRENT_HASHMAP
public static int CONCURRENT_HASHMAP_ENTRY
public static int CONCURRENT_HASHMAP_SEGMENT
public static int CONCURRENT_SKIPLISTMAP
public static int CONCURRENT_SKIPLISTMAP_ENTRY
public static int REENTRANT_LOCK
public static int ATOMIC_LONG
public static int ATOMIC_INTEGER
public static int ATOMIC_BOOLEAN
public static int COPYONWRITE_ARRAYSET
public static int COPYONWRITE_ARRAYLIST
Constructor Detail |
---|
public ClassSize()
Method Detail |
---|
public static long estimateBase(Class<?> cl, boolean debug)
public static int align(int num)
num
- number to align to 8
public static long align(long num)
num
- number to align to 8
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |