Class Megabytes
java.lang.Object
com.oracle.coherence.common.util.MemorySize
com.tangosol.coherence.config.unit.Megabytes
public class Megabytes
extends com.oracle.coherence.common.util.MemorySize
Megabytes
is a specialized MemorySize
whose default constructor
assumes that the specified units (when a they are not specified) are
measured in megabytes.
Note: This class is provided to simplify and support backwards compatibility
during the injection of MemorySize
s into appropriate classes. This
class is not designed for general purpose representation of
capacity. For general purpose representations of memory capacity, please use the
MemorySize
class.
- Since:
- Coherence 12.1.2
- Author:
- bo 2012.01.19
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.coherence.common.util.MemorySize
com.oracle.coherence.common.util.MemorySize.Magnitude
-
Constructor Summary
-
Method Summary
Methods inherited from class com.oracle.coherence.common.util.MemorySize
as, equals, getByteCount, hashCode, toString, toString
-
Constructor Details
-
Megabytes
public Megabytes(int c) Constructs aMegabytes
representing aMemorySize
measured in megabytes.- Parameters:
c
- the number of megabytes
-
Megabytes
public Megabytes(com.oracle.coherence.common.util.MemorySize m) Constructs aMegabytes
based on anotherMemorySize
.- Parameters:
m
- theMemorySize
-
Megabytes
Constructs aMegabytes
representing aMemorySize
measured in megabytes.- Parameters:
s
- the number of megabytes or otherMemorySize
when magnitudes are specified- See Also:
-
-
Method Details
-
get
public long get()Obtain theMemorySize
in megabytes.- Returns:
- the number of megabytes in the
MemorySize
-