Package com.yahoo.prelude
Class Freshness
- java.lang.Object
-
- com.yahoo.prelude.Freshness
-
public class Freshness extends 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(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 secondsint
hashCode()
String
toString()
Set the reference time as a string value
-
-
-
Constructor Detail
-
Freshness
public Freshness(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 String toString()
Set the reference time as a string value
-
-