Class StoreStats

java.lang.Object
org.elasticsearch.index.store.StoreStats
All Implemented Interfaces:
Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

public class StoreStats
extends java.lang.Object
implements Writeable, org.elasticsearch.common.xcontent.ToXContentFragment
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    Writeable.Reader<V>, Writeable.Writer<V>
  • Field Summary

    Fields
    Modifier and Type Field Description
    static Version RESERVED_BYTES_VERSION  
    static long UNKNOWN_RESERVED_BYTES
    Sentinel value for cases where the shard does not yet know its reserved size so we must fall back to an estimate, for instance prior to receiving the list of files in a peer recovery.

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor Description
    StoreStats()  
    StoreStats​(long sizeInBytes, long reservedSize)  
    StoreStats​(StreamInput in)  
  • Method Summary

    Modifier and Type Method Description
    void add​(StoreStats stats)  
    ByteSizeValue getReservedSize()
    A prediction of how much larger this store will eventually grow.
    ByteSizeValue getSize()  
    long getSizeInBytes()  
    ByteSizeValue size()  
    long sizeInBytes()  
    org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)  
    void writeTo​(StreamOutput out)
    Write this into the StreamOutput.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment

    isFragment
  • Field Details

    • UNKNOWN_RESERVED_BYTES

      public static final long UNKNOWN_RESERVED_BYTES
      Sentinel value for cases where the shard does not yet know its reserved size so we must fall back to an estimate, for instance prior to receiving the list of files in a peer recovery.
      See Also:
      Constant Field Values
    • RESERVED_BYTES_VERSION

      public static final Version RESERVED_BYTES_VERSION
  • Constructor Details

    • StoreStats

      public StoreStats()
    • StoreStats

      public StoreStats​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
    • StoreStats

      public StoreStats​(long sizeInBytes, long reservedSize)
      Parameters:
      sizeInBytes - the size of the store in bytes
      reservedSize - a prediction of how much larger the store is expected to grow, or UNKNOWN_RESERVED_BYTES.
  • Method Details

    • add

      public void add​(StoreStats stats)
    • sizeInBytes

      public long sizeInBytes()
    • getSizeInBytes

      public long getSizeInBytes()
    • size

      public ByteSizeValue size()
    • getSize

      public ByteSizeValue getSize()
    • getReservedSize

      public ByteSizeValue getReservedSize()
      A prediction of how much larger this store will eventually grow. For instance, if we are currently doing a peer recovery or restoring a snapshot into this store then we can account for the rest of the recovery using this field. A value of -1B indicates that the reserved size is unknown.
    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      java.io.IOException
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      java.io.IOException