|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hazelcast.memory.MemorySize
public final class MemorySize
MemorySize represents a memory size with given value and MemoryUnit.
MemoryUnit
Constructor Summary | |
---|---|
MemorySize(long value)
|
|
MemorySize(long value,
MemoryUnit unit)
|
Method Summary | |
---|---|
long |
bytes()
Returns value of memory size in bytes. |
MemoryUnit |
getUnit()
Returns unit of memory size |
long |
getValue()
Returns value of memory size in its original unit. |
long |
gigaBytes()
Returns value of memory size in giga-bytes. |
long |
kiloBytes()
Returns value of memory size in kilo-bytes. |
long |
megaBytes()
Returns value of memory size in mega-bytes. |
static MemorySize |
parse(String value)
Parses string representation of a memory size value. |
static MemorySize |
parse(String value,
MemoryUnit defaultUnit)
Parses string representation of a memory size value. |
String |
toPrettyString()
Returns a pretty format String representation of this memory size. |
static String |
toPrettyString(long size)
Utility method to create a pretty format representation of given value in bytes. |
static String |
toPrettyString(long size,
MemoryUnit unit)
Utility method to create a pretty format representation of given value in given unit. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MemorySize(long value)
public MemorySize(long value, MemoryUnit unit)
Method Detail |
---|
public long getValue()
public MemoryUnit getUnit()
public long bytes()
public long kiloBytes()
public long megaBytes()
public long gigaBytes()
public static MemorySize parse(String value)
public static MemorySize parse(String value, MemoryUnit defaultUnit)
public String toPrettyString()
public String toString()
toString
in class Object
public static String toPrettyString(long size)
size
- size in bytes
public static String toPrettyString(long size, MemoryUnit unit)
size
- memory sizeunit
- memory unit
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |