Class RefreshStrategy.Timed
- java.lang.Object
-
- org.apache.jackrabbit.oak.jcr.session.RefreshStrategy.Timed
-
- All Implemented Interfaces:
RefreshStrategy
- Enclosing interface:
- RefreshStrategy
public static class RefreshStrategy.Timed extends Object implements RefreshStrategy
This refresh strategy refreshes after a given timeout of inactivity.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.jcr.session.RefreshStrategy
RefreshStrategy.Composite, RefreshStrategy.Timed
-
-
Field Summary
Fields Modifier and Type Field Description protected longinterval
-
Constructor Summary
Constructors Constructor Description Timed(long interval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanneedsRefresh(long secondsSinceLastAccess)Determine whether the given session needs to refresh before the next session operation is performed.voidrefreshed()StringtoString()
-
-
-
Method Detail
-
needsRefresh
public boolean needsRefresh(long secondsSinceLastAccess)
Description copied from interface:RefreshStrategyDetermine whether the given session needs to refresh before the next session operation is performed.This implementation returns
trueif and only if any of the individual refresh strategies passed to the constructor returnstrue.- Specified by:
needsRefreshin interfaceRefreshStrategy- Parameters:
secondsSinceLastAccess- seconds since last access- Returns:
trueif and only if the session needs to refresh.
-
refreshed
public void refreshed()
- Specified by:
refreshedin interfaceRefreshStrategy
-
-