@Override
@SuppressWarnings("unchecked")
public Iterable<VFSContext> getCachedContexts()
{
TimedCachePolicy tcp = getPolicy();
List keys = tcp.getValidKeys();
if (keys != null && keys.isEmpty() == false)
{
Map<Object, VFSContext> contexts = new TreeMap<Object, VFSContext>();
for (Object key : keys)
{
VFSContext context = (VFSContext)tcp.peek(key);
if (context != null) // should be there, but you never know
contexts.put(key, context);
}
return contexts.values();