Package org.elasticsearch.index.store
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.ParamsNested 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 VersionRESERVED_BYTES_VERSIONstatic longUNKNOWN_RESERVED_BYTESSentinel 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 voidadd(StoreStats stats)ByteSizeValuegetReservedSize()A prediction of how much larger this store will eventually grow.ByteSizeValuegetSize()longgetSizeInBytes()ByteSizeValuesize()longsizeInBytes()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
UNKNOWN_RESERVED_BYTES
public static final long UNKNOWN_RESERVED_BYTESSentinel 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
-
-
Constructor Details
-
StoreStats
public StoreStats() -
StoreStats
- Throws:
java.io.IOException
-
StoreStats
public StoreStats(long sizeInBytes, long reservedSize)- Parameters:
sizeInBytes- the size of the store in bytesreservedSize- a prediction of how much larger the store is expected to grow, orUNKNOWN_RESERVED_BYTES.
-
-
Method Details
-
add
-
sizeInBytes
public long sizeInBytes() -
getSizeInBytes
public long getSizeInBytes() -
size
-
getSize
-
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-1Bindicates that the reserved size is unknown. -
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput. -
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:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
java.io.IOException
-