Class TrialLicenseVersion

java.lang.Object
org.elasticsearch.license.internal.TrialLicenseVersion
All Implemented Interfaces:
Writeable, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentFragment

public class TrialLicenseVersion extends Object implements org.elasticsearch.xcontent.ToXContentFragment, Writeable
Sometimes we release a version with a bunch of cool new features, and we want people to be able to start a new trial license in a cluster that's already used a trial and let it expire. This class controls when we do that. The serialization of this class is designed to maintain compatibility with old-school Elasticsearch versions (specifically the Version class).
  • Field Details

  • Constructor Details

    • TrialLicenseVersion

      public TrialLicenseVersion(int trialVersion)
    • TrialLicenseVersion

      public TrialLicenseVersion(StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details

    • fromXContent

      public static TrialLicenseVersion fromXContent(String from)
    • ableToStartNewTrial

      public boolean ableToStartNewTrial()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException