/** * Step 2: Look up the path in ReferralCache if a cache is being maintained. * If no cache is being maintained, go to step 5. * 1. If no matching entry is found in ReferralCache, go to step 5. * 2. If an entry's TTL has expired: * - If RootOrLink indicates DFS root targets, goto step 5. * - If RootOrLink indicates DFS link targets, goto step 9. * 3. If an entry contains DFS link targets as indicated by RootOrLink, go to step 4; otherwise, go to * step 3. */ private DFSPath step2(Session session, ResolveState state) throws DFSException { logger.trace("DFS[2]: {}", state); ReferralCache.ReferralCacheEntry lookup = referralCache.lookup(state.path); if (lookup == null || (lookup.isExpired() && lookup.isRoot())) { return step5(session, state); // Resolve Root Referral } if (lookup.isExpired()) { // Expired LINK target return step9(session, state, lookup); // Resolve Link Referral } if (lookup.isLink()) { return step4(session, state, lookup); } return step3(session, state, lookup); }
/** * Step 2: Look up the path in ReferralCache if a cache is being maintained. * If no cache is being maintained, go to step 5. * 1. If no matching entry is found in ReferralCache, go to step 5. * 2. If an entry's TTL has expired: * - If RootOrLink indicates DFS root targets, goto step 5. * - If RootOrLink indicates DFS link targets, goto step 9. * 3. If an entry contains DFS link targets as indicated by RootOrLink, go to step 4; otherwise, go to * step 3. */ private DFSPath step2(Session session, ResolveState state) throws DFSException { logger.trace("DFS[2]: {}", state); ReferralCache.ReferralCacheEntry lookup = referralCache.lookup(state.path); if (lookup == null || (lookup.isExpired() && lookup.isRoot())) { return step5(session, state); // Resolve Root Referral } if (lookup.isExpired()) { // Expired LINK target return step9(session, state, lookup); // Resolve Link Referral } if (lookup.isLink()) { return step4(session, state, lookup); } return step3(session, state, lookup); }