java.lang.Comparable<ByteSizeValue>, Writeable, ToXContent, ToXContentFragmentpublic class ByteSizeValue extends java.lang.Object implements Writeable, java.lang.Comparable<ByteSizeValue>, ToXContentFragment
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>EMPTY_PARAMS| Constructor | Description |
|---|---|
ByteSizeValue(long bytes) |
|
ByteSizeValue(long size,
ByteSizeUnit unit) |
|
ByteSizeValue(StreamInput in) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
bytesAsInt() |
Deprecated.
|
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() |
|
java.lang.String |
getStringRep() |
|
long |
getTb() |
|
double |
getTbFrac() |
|
int |
hashCode() |
|
static ByteSizeValue |
parseBytesSizeValue(java.lang.String sValue,
java.lang.String settingName) |
|
static ByteSizeValue |
parseBytesSizeValue(java.lang.String sValue,
ByteSizeValue defaultValue,
java.lang.String settingName) |
|
java.lang.String |
toString() |
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitisFragmentpublic ByteSizeValue(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic ByteSizeValue(long bytes)
public ByteSizeValue(long size,
ByteSizeUnit unit)
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable@Deprecated 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 getStringRep()
parseBytesSizeValue(String, ByteSizeValue, String).
Unlike toString() this method will not output fractional
or rounded values so this method should be preferred when
serialising the value to JSON.public java.lang.String toString()
toString in class java.lang.Objectpublic static ByteSizeValue parseBytesSizeValue(java.lang.String sValue, java.lang.String settingName) throws ElasticsearchParseException
ElasticsearchParseExceptionpublic static ByteSizeValue parseBytesSizeValue(java.lang.String sValue, ByteSizeValue defaultValue, java.lang.String settingName) throws ElasticsearchParseException
ElasticsearchParseExceptionpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(ByteSizeValue other)
compareTo in interface java.lang.Comparable<ByteSizeValue>public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOException