java/serving/src/main/java/feast/serving/service/OnlineServingServiceV2.java
private static boolean checkOutsideMaxAge(
      feast.storage.api.retriever.Feature feature, Timestamp entityTimestamp, Duration maxAge) {

    if (maxAge.equals(Duration.getDefaultInstance())) { // max age is not set
      return false;
    }

    long givenTimestamp = entityTimestamp.getSeconds();
    if (givenTimestamp == 0) {
      givenTimestamp = System.currentTimeMillis() / 1000;
    }
    long timeDifference = givenTimestamp - feature.getEventTimestamp().getSeconds();
    return timeDifference > maxAge.getSeconds();
  }
/**
   * Determine if the feature data in the given feature row is outside maxAge. Data is outside
   * maxAge to be when the difference ingestion time set in feature row and the retrieval time set
   * in entity row exceeds FeatureTable max age.
   *
   * @param feature contains the ingestion timing and feature data.
   * @param entityTimestamp contains the retrieval timing of when features are pulled.
   * @param maxAge feature's max age.
   */
Determine if the feature data in the given feature row is outside maxAge. Data is outside
maxAge to be when the difference ingestion time set in feature row and the retrieval time set
in entity row exceeds FeatureTable max age.

@param feature contains the ingestion timing and feature data.
@param entityTimestamp contains the retrieval timing of when features are pulled.
@param maxAge feature's max age.
Determine if the feature data in the given feature row is outside maxAge . Data is outside maxAge to be when the difference ingestion time set in feature row and the retrieval time set in entity row exceeds FeatureTable max age . @param feature contains the ingestion timing and feature data . @param entityTimestamp contains the retrieval timing of when features are pulled . @param maxAge feature ' s max age .
private static boolean checkOutsideMaxAge(
      feast.storage.api.retriever.Feature feature, Timestamp entityTimestamp, Duration maxAge) {
    if (maxAge.equals(Duration.getDefaultInstance())) { 
      return false;
    }
    long givenTimestamp = entityTimestamp.getSeconds();
    if (givenTimestamp == 0) {
      givenTimestamp = System.currentTimeMillis() / 1000;
    }
    long timeDifference = givenTimestamp - feature.getEventTimestamp().getSeconds();
    return timeDifference > maxAge.getSeconds();
  }
private static boolean checkOutsideMaxAge ( feast . storage . api . retriever . Feature feature , Timestamp entityTimestamp , Duration maxAge ) { if ( maxAge . equals ( Duration . getDefaultInstance ( ) ) ) { return false ; } long givenTimestamp = entityTimestamp . getSeconds ( ) ; if ( givenTimestamp == 0 ) { givenTimestamp = System . currentTimeMillis ( ) / 1000 ; } long timeDifference = givenTimestamp - feature . getEventTimestamp ( ) . getSeconds ( ) ; return timeDifference > maxAge . getSeconds ( ) ; }
Determine if the feature data in the given feature row is outside maxAge.
Determine if the feature data in the given feature row is outside maxAge .
// max age is not set