org.elasticsearch.util
Class SizeValue

java.lang.Object
  extended by org.elasticsearch.util.SizeValue
All Implemented Interfaces:
java.io.Serializable, Streamable

public class SizeValue
extends java.lang.Object
implements java.io.Serializable, Streamable

See Also:
Serialized Form

Constructor Summary
SizeValue(long bytes)
           
SizeValue(long size, SizeUnit sizeUnit)
           
 
Method Summary
 long bytes()
           
 boolean equals(java.lang.Object o)
           
 long gb()
           
 double gbFrac()
           
 long getBytes()
           
 long getGb()
           
 double getGbFrac()
           
 long getKb()
           
 double getKbFrac()
           
 long getMb()
           
 double getMbFrac()
           
 int hashCode()
           
 long kb()
           
 double kbFrac()
           
 long mb()
           
 double mbFrac()
           
static SizeValue parseSizeValue(java.lang.String sValue, SizeValue defaultValue)
           
 void readFrom(StreamInput in)
           
static SizeValue readSizeValue(StreamInput in)
           
 java.lang.String toString()
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SizeValue

public SizeValue(long bytes)

SizeValue

public SizeValue(long size,
                 SizeUnit sizeUnit)
Method Detail

bytes

public long bytes()

getBytes

public long getBytes()

kb

public long kb()

getKb

public long getKb()

mb

public long mb()

getMb

public long getMb()

gb

public long gb()

getGb

public long getGb()

kbFrac

public double kbFrac()

getKbFrac

public double getKbFrac()

mbFrac

public double mbFrac()

getMbFrac

public double getMbFrac()

gbFrac

public double gbFrac()

getGbFrac

public double getGbFrac()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

parseSizeValue

public static SizeValue parseSizeValue(java.lang.String sValue,
                                       SizeValue defaultValue)
                                throws ElasticSearchParseException
Throws:
ElasticSearchParseException

readSizeValue

public static SizeValue readSizeValue(StreamInput in)
                               throws java.io.IOException
Throws:
java.io.IOException

readFrom

public void readFrom(StreamInput in)
              throws java.io.IOException
Specified by:
readFrom in interface Streamable
Throws:
java.io.IOException

writeTo

public void writeTo(StreamOutput out)
             throws java.io.IOException
Specified by:
writeTo in interface Streamable
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object