Class TimeSeriesOptions


  • public class TimeSeriesOptions
    extends Object
    Options used to configure timeseries options.

    Added in MongoDB 5.0 https://www.mongodb.com/docs/manual/core/timeseries-collections/

    Author:
    Liu Chong
    • Field Detail

      • DEFAULT_TIME_FIELD

        public static final String DEFAULT_TIME_FIELD
        The default time field value for timeseries collections.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TimeSeriesOptions

        public TimeSeriesOptions()
      • TimeSeriesOptions

        public TimeSeriesOptions​(TimeSeriesOptions options)
        Copy constructor.
      • TimeSeriesOptions

        public TimeSeriesOptions​(JsonObject json)
    • Method Detail

      • toMongoDriverObject

        public com.mongodb.client.model.TimeSeriesOptions toMongoDriverObject()
      • getTimeField

        public String getTimeField()
        Returns:
        the timeField
      • setTimeField

        public TimeSeriesOptions setTimeField​(String timeField)
        Parameters:
        timeField - the timeField to set
      • getMetaField

        public String getMetaField()
        Returns:
        the metaField
      • setMetaField

        public TimeSeriesOptions setMetaField​(String metaField)
        Parameters:
        metaField - the metaField to set
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object