public static class RefreshStrategy.ConditionalRefreshStrategy extends Object implements RefreshStrategy
RefreshStrategy.Composite, RefreshStrategy.ConditionalRefreshStrategy, RefreshStrategy.LogOnce, RefreshStrategy.Timed
Constructor and Description |
---|
ConditionalRefreshStrategy(RefreshStrategy delegate,
com.google.common.base.Predicate<Long> condition) |
Modifier and Type | Method and Description |
---|---|
boolean |
needsRefresh(long secondsSinceLastAccess)
Determine whether the given session needs to refresh before the next
session operation is performed.
|
void |
refreshed() |
public ConditionalRefreshStrategy(RefreshStrategy delegate, com.google.common.base.Predicate<Long> condition)
public boolean needsRefresh(long secondsSinceLastAccess)
RefreshStrategy
This implementation returns true
if and only if any of the
individual refresh strategies passed to the constructor returns
true
.
needsRefresh
in interface RefreshStrategy
secondsSinceLastAccess
- seconds since last accesstrue
if and only if the session needs to refresh.public void refreshed()
refreshed
in interface RefreshStrategy
Copyright © 2012–2017 The Apache Software Foundation. All rights reserved.