Code example for Cache

Methods: getIfPresent

0
        StoredEquivalenceResult equivalenceResult = mrwItemCache.getIfPresent(canonicalUri);
        if(equivalenceResult != null) {
            return equivalenceResult;
        } 
         
        equivalenceResult = mrwContainerCache.getIfPresent(canonicalUri);
        if(equivalenceResult != null) {
            return equivalenceResult;
        } 
        return delegate.forId(canonicalUri);
    } 
     
    @Override 
    public List<StoredEquivalenceResult> forIds(Iterable<String> canonicalUris) {
        return delegate.forIds(canonicalUris);
    } 
     
    public List<StoredEquivalenceResult> latestItemResults() {
        return ImmutableList.copyOf(mrwItemCache.asMap().values());
    } 
Connect your IDE to all the code out there  Get Codota for Java