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 moreRefreshStrategy
instances, 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 RefreshStrategy
create(RefreshStrategy... refreshStrategies)
boolean
needsRefresh(long secondsSinceLastAccess)
Determine whether the given session needs to refresh before the next session operation is performed.void
refreshed()
String
toString()
-
-
-
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
true
if and only if any of the individual refresh strategies passed to the constructor returnstrue
.- Specified by:
needsRefresh
in interfaceRefreshStrategy
- Parameters:
secondsSinceLastAccess
- seconds since last access- Returns:
true
if and only if the session needs to refresh.
-
refreshed
public void refreshed()
- Specified by:
refreshed
in interfaceRefreshStrategy
-
-