Interface ExpirationMechanism<U extends java.io.Serializable,​I extends java.io.Serializable,​P>

Type Parameters:
U - type of the users
I - type of the information
P - type of the parameters.
All Known Implementing Classes:
AllNotPropagatedExpirationMechanism, AllNotRealPropagatedExpirationMechanism, AllNotRealPropagatedTimestampExpirationMechanism, ExponentialDecayExpirationMechanism, InfiniteTimeExpirationMechanism, TimedExpirationMechanism

public interface ExpirationMechanism<U extends java.io.Serializable,​I extends java.io.Serializable,​P>
Interface for checking the expiration of the information pieces.
  • Method Summary

    Modifier and Type Method Description
    java.util.stream.Stream<java.lang.Integer> expire​(UserState<U> user, Data<U,​I,​P> data, int numIter, java.lang.Long timestamp)
    Obtains the information that has expired in the current iteration.
  • Method Details

    • expire

      java.util.stream.Stream<java.lang.Integer> expire​(UserState<U> user, Data<U,​I,​P> data, int numIter, java.lang.Long timestamp)
      Obtains the information that has expired in the current iteration.
      Parameters:
      user - UserState to check.
      data - The full data.
      numIter - Current iteration.
      timestamp - moment of time represented by the iteration.
      Returns:
      A stream with the identifiers of all the received information pieces that have expired.