Class Freshness


  • public class Freshness
    extends java.lang.Object
    The parameters for a freshness query (uses the datetime http parameter) Parses the string part of the "datetime=<string>", converts it to seconds since epoch and send that plus sets the flag in the QueryX packet that enables freshnessboost in fsearch.

    This is a value object

    Author:
    Per G. Auran
    • Constructor Summary

      Constructors 
      Constructor Description
      Freshness​(java.lang.String dateTime)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      long getRefTime()
      Get the reference time as a long value (in seconds since epoch)
      long getSystemTimeInSecondsSinceEpoch()
      Calculates the current time since epoch in seconds
      int hashCode()  
      java.lang.String toString()
      Set the reference time as a string value
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Freshness

        public Freshness​(java.lang.String dateTime)
    • Method Detail

      • getSystemTimeInSecondsSinceEpoch

        public long getSystemTimeInSecondsSinceEpoch()
        Calculates the current time since epoch in seconds
      • getRefTime

        public long getRefTime()
        Get the reference time as a long value (in seconds since epoch)
      • toString

        public java.lang.String toString()
        Set the reference time as a string value
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object