public class Units extends Object
Units
is a union of MemorySize
and unit count.
Note: This class is provided to support the high-units configuration property
which can either be a memory size string or the number of units. The default
unit calculator depends on whether the configuration explicitly specified
a memory size (e.g. <high-units>20M</high-units>).Constructor and Description |
---|
Units(long cUnits)
Construct a Units object with the given unit count.
|
Units(com.oracle.coherence.common.util.MemorySize memorySize)
Construct a Units object with the given
MemorySize . |
Units(String sValue)
Construct a Units object.
|
Modifier and Type | Method and Description |
---|---|
com.oracle.coherence.common.util.MemorySize |
getMemorySize()
Return the
MemorySize . |
long |
getUnitCount()
Return the unit count.
|
boolean |
isMemorySize()
Return true if Units contains a
MemorySize . |
public Units(String sValue)
sValue
- the unit count or memory sizepublic Units(long cUnits)
cUnits
- the unit countpublic Units(com.oracle.coherence.common.util.MemorySize memorySize)
MemorySize
.memorySize
- the MemorySize
public long getUnitCount()
public com.oracle.coherence.common.util.MemorySize getMemorySize()
MemorySize
. If this object was constructed with a unit count then
MemorySize
will be null.MemorySize
or nullpublic boolean isMemorySize()
MemorySize
.MemorySize