Module org.elasticsearch.server
Class ExplainIndexDataStreamLifecycle
java.lang.Object
org.elasticsearch.action.datastreams.lifecycle.ExplainIndexDataStreamLifecycle
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentObject
Encapsulates the information that describes an index from its data stream lifecycle perspective.
-
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
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
ConstructorsConstructorDescriptionExplainIndexDataStreamLifecycle
(String index, boolean managedByLifecycle, Long indexCreationDate, Long rolloverDate, TimeValue generationDate, DataStreamLifecycle lifecycle, String error) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getError()
getGenerationTime
(Supplier<Long> now) Calculates the time since this index started progressing towards the remaining of its lifecycle past rollover.getIndex()
Calculates the time lapsed since the index was created.getTimeSinceRollover
(Supplier<Long> now) Calculates the time lapsed since the index was rolled over.int
hashCode()
boolean
void
setNowSupplier
(Supplier<Long> nowSupplier) toXContent
(XContentBuilder builder, ToXContent.Params params) toXContent
(XContentBuilder builder, ToXContent.Params params, RolloverConfiguration rolloverConfiguration) 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.ToXContentObject
isFragment
-
Constructor Details
-
ExplainIndexDataStreamLifecycle
-
ExplainIndexDataStreamLifecycle
- Throws:
IOException
-
-
Method Details
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params, @Nullable RolloverConfiguration rolloverConfiguration) throws IOException - Throws:
IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
getGenerationTime
Calculates the time since this index started progressing towards the remaining of its lifecycle past rollover. Every index will either have to wait to be rolled over before progressing towards its retention part of its lifecycle, or be added to the datastream manually. If the index is the write index this will return null. -
getTimeSinceIndexCreation
Calculates the time lapsed since the index was created. It can be null as we don't serialise the index creation field for un-managed indices. -
getTimeSinceRollover
Calculates the time lapsed since the index was rolled over. It can be null if the index was not rolled over or for un-managed indecs as we don't serialise the rollover data field. -
getIndex
-
isManagedByLifecycle
public boolean isManagedByLifecycle() -
getIndexCreationDate
-
getRolloverDate
-
getLifecycle
-
getError
-
setNowSupplier
-
equals
-
hashCode
public int hashCode()
-