public class ByteSizeValue extends java.lang.Object implements Writeable, java.lang.Comparable<ByteSizeValue>
Writeable.Reader<V>, Writeable.Writer<V>
Constructor and Description |
---|
ByteSizeValue(long bytes) |
ByteSizeValue(long size,
ByteSizeUnit unit) |
ByteSizeValue(StreamInput in) |
Modifier and Type | Method and Description |
---|---|
int |
bytesAsInt() |
int |
compareTo(ByteSizeValue other) |
boolean |
equals(java.lang.Object o) |
long |
getBytes() |
long |
getGb() |
double |
getGbFrac() |
long |
getKb() |
double |
getKbFrac() |
long |
getMb() |
double |
getMbFrac() |
long |
getPb() |
double |
getPbFrac() |
long |
getTb() |
double |
getTbFrac() |
int |
hashCode() |
static ByteSizeValue |
parseBytesSizeValue(java.lang.String sValue,
ByteSizeValue defaultValue,
java.lang.String settingName) |
static ByteSizeValue |
parseBytesSizeValue(java.lang.String sValue,
java.lang.String settingName) |
java.lang.String |
toString() |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
public ByteSizeValue(StreamInput in) throws java.io.IOException
java.io.IOException
public ByteSizeValue(long bytes)
public ByteSizeValue(long size, ByteSizeUnit unit)
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
public int bytesAsInt()
public long getBytes()
public long getKb()
public long getMb()
public long getGb()
public long getTb()
public long getPb()
public double getKbFrac()
public double getMbFrac()
public double getGbFrac()
public double getTbFrac()
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 boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(ByteSizeValue other)
compareTo
in interface java.lang.Comparable<ByteSizeValue>