|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<MemoryUnit>
com.hazelcast.memory.MemoryUnit
public enum MemoryUnit
MemoryUnit represents memory size at a given unit of granularity and provides utility methods to convert across units.
MemorySize| Enum Constant Summary | |
|---|---|
BYTES
MemoryUnit in bytes |
|
GIGABYTES
MemoryUnit in gigabytes |
|
KILOBYTES
MemoryUnit in kilobytes |
|
MEGABYTES
MemoryUnit in megabytes |
|
| Method Summary | |
|---|---|
abstract long |
convert(long value,
MemoryUnit m)
|
abstract long |
toBytes(long value)
|
abstract long |
toGigaBytes(long value)
|
abstract long |
toKiloBytes(long value)
|
abstract long |
toMegaBytes(long value)
|
static MemoryUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static MemoryUnit[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final MemoryUnit BYTES
public static final MemoryUnit KILOBYTES
public static final MemoryUnit MEGABYTES
public static final MemoryUnit GIGABYTES
| Method Detail |
|---|
public static MemoryUnit[] values()
for (MemoryUnit c : MemoryUnit.values()) System.out.println(c);
public static MemoryUnit valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
public abstract long convert(long value,
MemoryUnit m)
public abstract long toBytes(long value)
public abstract long toKiloBytes(long value)
public abstract long toMegaBytes(long value)
public abstract long toGigaBytes(long value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||