java.lang.Object
org.elasticsearch.index.store.StoreStats
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentFragment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Version
static final Version
static final long
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.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionStoreStats
(long sizeInBytes, long totalDataSetSizeInBytes, long reservedSize) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(StoreStats stats) boolean
A prediction of how much larger this store will eventually grow.getSize()
long
int
hashCode()
size()
long
long
toXContent
(XContentBuilder builder, ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.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:
-
RESERVED_BYTES_VERSION
-
TOTAL_DATA_SET_SIZE_SIZE_VERSION
-
-
Constructor Details
-
StoreStats
public StoreStats() -
StoreStats
- Throws:
IOException
-
StoreStats
public StoreStats(long sizeInBytes, long totalDataSetSizeInBytes, long reservedSize) - Parameters:
sizeInBytes
- the size of the store in bytestotalDataSetSizeInBytes
- the size of the total data set in bytes, can differ from sizeInBytes for shards using shared cache storagereservedSize
- 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
-
totalDataSetSize
-
getTotalDataSetSize
-
totalDataSetSizeInBytes
public long totalDataSetSizeInBytes() -
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
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-