org.apache.jackrabbit.oak.jcr.session
Class RefreshStrategy.Composite

java.lang.Object
  extended by 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 more RefreshStrategy 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.LogOnce, RefreshStrategy.Timed
 
Constructor Summary
RefreshStrategy.Composite(RefreshStrategy... refreshStrategies)
          Create a new instance consisting of the composite of the passed RefreshStrategy instances.
 
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
 

Constructor Detail

RefreshStrategy.Composite

public RefreshStrategy.Composite(RefreshStrategy... refreshStrategies)
Create a new instance consisting of the composite of the passed RefreshStrategy instances.

Parameters:
refreshStrategies - individual refresh strategies
Method Detail

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 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.