org.apache.jackrabbit.oak.jcr.session
Class RefreshStrategy.Timed
java.lang.Object
org.apache.jackrabbit.oak.jcr.session.RefreshStrategy.Timed
- All Implemented Interfaces:
- RefreshStrategy
- Direct Known Subclasses:
- RefreshStrategy.LogOnce
- Enclosing interface:
- RefreshStrategy
public static class RefreshStrategy.Timed
- extends Object
- implements RefreshStrategy
This refresh strategy refreshes after a given timeout of inactivity.
Method Summary |
boolean |
needsRefresh(long secondsSinceLastAccess)
Determine whether the given session needs to refresh before the next
session operation is performed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RefreshStrategy.Timed
public RefreshStrategy.Timed(long interval)
- Parameters:
interval
- Interval in seconds after which a session should refresh if there was no
activity.
needsRefresh
public boolean needsRefresh(long secondsSinceLastAccess)
- Description copied from interface:
RefreshStrategy
- 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.
Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.