public class ByteSizeValue extends java.lang.Object implements Streamable
Constructor and Description |
---|
ByteSizeValue(long bytes) |
ByteSizeValue(long size,
ByteSizeUnit sizeUnit) |
Modifier and Type | Method and Description |
---|---|
long |
bytes() |
int |
bytesAsInt() |
boolean |
equals(java.lang.Object o) |
long |
gb() |
double |
gbFrac() |
long |
getBytes() |
long |
getGb() |
double |
getGbFrac() |
long |
getKb() |
double |
getKbFrac() |
long |
getMb() |
double |
getMbFrac() |
long |
getPb() |
double |
getPbFrac() |
long |
getTb() |
double |
getTbFrac() |
int |
hashCode() |
long |
kb() |
double |
kbFrac() |
long |
mb() |
double |
mbFrac() |
static ByteSizeValue |
parseBytesSizeValue(java.lang.String sValue,
ByteSizeValue defaultValue,
java.lang.String settingName) |
static ByteSizeValue |
parseBytesSizeValue(java.lang.String sValue,
java.lang.String settingName) |
long |
pb() |
double |
pbFrac() |
static ByteSizeValue |
readBytesSizeValue(StreamInput in) |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
long |
tb() |
double |
tbFrac() |
java.lang.String |
toString() |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
public ByteSizeValue(long bytes)
public ByteSizeValue(long size, ByteSizeUnit sizeUnit)
public int bytesAsInt()
public long bytes()
public long getBytes()
public long kb()
public long getKb()
public long mb()
public long getMb()
public long gb()
public long getGb()
public long tb()
public long getTb()
public long pb()
public long getPb()
public double kbFrac()
public double getKbFrac()
public double mbFrac()
public double getMbFrac()
public double gbFrac()
public double getGbFrac()
public double tbFrac()
public double getTbFrac()
public double pbFrac()
public double getPbFrac()
public java.lang.String toString()
toString
in class java.lang.Object
public static ByteSizeValue parseBytesSizeValue(java.lang.String sValue, java.lang.String settingName) throws ElasticsearchParseException
ElasticsearchParseException
public static ByteSizeValue parseBytesSizeValue(java.lang.String sValue, ByteSizeValue defaultValue, java.lang.String settingName) throws ElasticsearchParseException
ElasticsearchParseException
public static ByteSizeValue readBytesSizeValue(StreamInput in) throws java.io.IOException
java.io.IOException
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
java.io.IOException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object