Class RefreshStrategy.Composite

  • All Implemented Interfaces:
    RefreshStrategy
    Enclosing interface:
    RefreshStrategy

    public static class RefreshStrategy.Composite
    extends java.lang.Object
    implements RefreshStrategy
    Composite of zero or more RefreshStrategy instances, each of which covers a certain strategy.
    • Method Detail

      • needsRefresh

        public boolean needsRefresh​(long secondsSinceLastAccess)
        Determine whether the given session needs to refresh before the next session operation is performed.

        This implementation returns true if and only if any of the individual refresh strategies passed to the constructor returns true.

        Specified by:
        needsRefresh in interface RefreshStrategy
        Parameters:
        secondsSinceLastAccess - seconds since last access
        Returns:
        true if and only if the session needs to refresh.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object