public class CacheSizes extends Object
Constructor and Description |
---|
CacheSizes() |
Modifier and Type | Method and Description |
---|---|
static int |
sizeOfAnything(Object object)
Returns the size of an object in bytes.
|
static int |
sizeOfBoolean()
Returns the size in bytes of a primitive boolean.
|
static int |
sizeOfChar()
Returns the size in bytes of a primitive char.
|
static int |
sizeOfCollection(Collection list)
Returns the size in bytes of a Collection object.
|
static int |
sizeOfDate()
Returns the size in bytes of a Date.
|
static int |
sizeOfDouble()
Returns the size in bytes of a primitive double.
|
static int |
sizeOfInt()
Returns the size in bytes of a primitive int.
|
static int |
sizeOfLong()
Returns the size in bytes of a primitive long.
|
static int |
sizeOfMap(Map<?,?> map)
Returns the size in bytes of a Map object.
|
static int |
sizeOfObject()
Returns the size in bytes of a basic Object.
|
static int |
sizeOfString(String string)
Returns the size in bytes of a String.
|
public static int sizeOfObject()
public static int sizeOfString(String string)
string
- the String to determine the size of.public static int sizeOfInt()
public static int sizeOfChar()
public static int sizeOfBoolean()
public static int sizeOfLong()
public static int sizeOfDouble()
public static int sizeOfDate()
public static int sizeOfMap(Map<?,?> map) throws CannotCalculateSizeException
map
- the Map object to determine the size of.CannotCalculateSizeException
- if the size cannot be calculatedpublic static int sizeOfCollection(Collection list) throws CannotCalculateSizeException
String
s, Long
s or Cacheable
objects.list
- the Collection object to determine the size of.CannotCalculateSizeException
- if the size cannot be calculatedpublic static int sizeOfAnything(Object object) throws CannotCalculateSizeException
object
- the object to calculate the size ofCannotCalculateSizeException
- if the size cannot be calculatedCopyright © 2003–2019 Ignite Realtime. All rights reserved.