Class RefreshStrategy.Composite
- java.lang.Object
-
- org.apache.jackrabbit.oak.jcr.session.RefreshStrategy.Composite
-
- All Implemented Interfaces:
RefreshStrategy
- Enclosing interface:
- RefreshStrategy
public static class RefreshStrategy.Composite extends Object implements RefreshStrategy
Composite of zero or moreRefreshStrategyinstances, each of which covers a certain strategy.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.jcr.session.RefreshStrategy
RefreshStrategy.Composite, RefreshStrategy.Timed
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RefreshStrategycreate(RefreshStrategy... refreshStrategies)booleanneedsRefresh(long secondsSinceLastAccess)Determine whether the given session needs to refresh before the next session operation is performed.voidrefreshed()StringtoString()
-
-
-
Method Detail
-
create
public static RefreshStrategy create(RefreshStrategy... refreshStrategies)
-
needsRefresh
public boolean needsRefresh(long secondsSinceLastAccess)
Determine 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
-
-