id
stringlengths
7
14
text
stringlengths
1
106k
206483_80
@Override public String getLocation() { return location; }
206483_81
public String getContent() { return content; }
206483_82
public static ProblemCollector newInstance( List<Problem> problems ) { return new DefaultProblemCollector( problems ); }
206483_83
public UrlSource( URL url ) { this.url = Objects.requireNonNull( url, "url cannot be null" ); this.hashCode = Objects.hashCode( url ); }
206483_84
@Override public InputStream getInputStream() throws IOException { return url.openStream(); }
206483_85
@Override public String getLocation() { return url.toString(); }
206483_86
public FileSource( File file ) { this.file = Objects.requireNonNull( file, "file cannot be null" ).getAbsoluteFile(); this.hashCode = Objects.hash( file ); }
206483_87
@Override public InputStream getInputStream() throws IOException { return new FileInputStream( file ); }
206483_88
@Override public String getLocation() { return file.getPath(); }
206483_89
public File getFile() { return file; }
206483_90
public List<Problem> getProblems() { return problems; }
206483_91
public List<Problem> getProblems() { return problems; }
206483_92
public List<Problem> getProblems() { return problems; }
206483_93
@Override public ToolchainsBuildingResult build( ToolchainsBuildingRequest request ) throws ToolchainsBuildingException { ProblemCollector problems = ProblemCollectorFactory.newInstance( null ); PersistedToolchains globalToolchains = readToolchains( request.getGlobalToolchainsSource(), request, problem...
206483_94
@Override public ToolchainsBuildingResult build( ToolchainsBuildingRequest request ) throws ToolchainsBuildingException { ProblemCollector problems = ProblemCollectorFactory.newInstance( null ); PersistedToolchains globalToolchains = readToolchains( request.getGlobalToolchainsSource(), request, problem...
206483_95
@Override public ToolchainsBuildingResult build( ToolchainsBuildingRequest request ) throws ToolchainsBuildingException { ProblemCollector problems = ProblemCollectorFactory.newInstance( null ); PersistedToolchains globalToolchains = readToolchains( request.getGlobalToolchainsSource(), request, problem...
206483_96
@Override public ToolchainsBuildingResult build( ToolchainsBuildingRequest request ) throws ToolchainsBuildingException { ProblemCollector problems = ProblemCollectorFactory.newInstance( null ); PersistedToolchains globalToolchains = readToolchains( request.getGlobalToolchainsSource(), request, problem...
206483_97
@Override public ToolchainsBuildingResult build( ToolchainsBuildingRequest request ) throws ToolchainsBuildingException { ProblemCollector problems = ProblemCollectorFactory.newInstance( null ); PersistedToolchains globalToolchains = readToolchains( request.getGlobalToolchainsSource(), request, problem...
206483_98
@Override public ToolchainsBuildingResult build( ToolchainsBuildingRequest request ) throws ToolchainsBuildingException { ProblemCollector problems = ProblemCollectorFactory.newInstance( null ); PersistedToolchains globalToolchains = readToolchains( request.getGlobalToolchainsSource(), request, problem...
206483_99
@Override public ToolchainsBuildingResult build( ToolchainsBuildingRequest request ) throws ToolchainsBuildingException { ProblemCollector problems = ProblemCollectorFactory.newInstance( null ); PersistedToolchains globalToolchains = readToolchains( request.getGlobalToolchainsSource(), request, problem...
206633_10
public MessageBundle getBundle(GadgetSpec spec, Locale locale, boolean ignoreCache, String container, String view) throws GadgetException { MessageBundle exact = getBundleFor(spec, locale, ignoreCache, container, view); // We don't want to fetch the same bundle multiple times, so we verify that the exact match ...
206633_11
public MessageBundle getBundle(GadgetSpec spec, Locale locale, boolean ignoreCache, String container, String view) throws GadgetException { MessageBundle exact = getBundleFor(spec, locale, ignoreCache, container, view); // We don't want to fetch the same bundle multiple times, so we verify that the exact match ...
206633_12
public MessageBundle getBundle(GadgetSpec spec, Locale locale, boolean ignoreCache, String container, String view) throws GadgetException { MessageBundle exact = getBundleFor(spec, locale, ignoreCache, container, view); // We don't want to fetch the same bundle multiple times, so we verify that the exact match ...
206633_13
public MessageBundle getBundle(GadgetSpec spec, Locale locale, boolean ignoreCache, String container, String view) throws GadgetException { MessageBundle exact = getBundleFor(spec, locale, ignoreCache, container, view); // We don't want to fetch the same bundle multiple times, so we verify that the exact match ...
206633_14
public MessageBundle getBundle(GadgetSpec spec, Locale locale, boolean ignoreCache, String container, String view) throws GadgetException { MessageBundle exact = getBundleFor(spec, locale, ignoreCache, container, view); // We don't want to fetch the same bundle multiple times, so we verify that the exact match ...
206633_15
public static Charset detectEncoding(byte[] input, boolean assume88591IfNotUtf8, FallbackEncodingDetector alternateDecoder) { if (looksLikeValidUtf8(input)) { return Charsets.UTF_8; } if (assume88591IfNotUtf8) { return Charsets.ISO_8859_1; } // Fall back encoding: return alternateDecoder.detectE...
206633_16
public static Charset detectEncoding(byte[] input, boolean assume88591IfNotUtf8, FallbackEncodingDetector alternateDecoder) { if (looksLikeValidUtf8(input)) { return Charsets.UTF_8; } if (assume88591IfNotUtf8) { return Charsets.ISO_8859_1; } // Fall back encoding: return alternateDecoder.detectE...
206633_17
public static Charset detectEncoding(byte[] input, boolean assume88591IfNotUtf8, FallbackEncodingDetector alternateDecoder) { if (looksLikeValidUtf8(input)) { return Charsets.UTF_8; } if (assume88591IfNotUtf8) { return Charsets.ISO_8859_1; } // Fall back encoding: return alternateDecoder.detectE...
206633_18
public static Charset detectEncoding(byte[] input, boolean assume88591IfNotUtf8, FallbackEncodingDetector alternateDecoder) { if (looksLikeValidUtf8(input)) { return Charsets.UTF_8; } if (assume88591IfNotUtf8) { return Charsets.ISO_8859_1; } // Fall back encoding: return alternateDecoder.detectE...
206633_19
public static Charset detectEncoding(byte[] input, boolean assume88591IfNotUtf8, FallbackEncodingDetector alternateDecoder) { if (looksLikeValidUtf8(input)) { return Charsets.UTF_8; } if (assume88591IfNotUtf8) { return Charsets.ISO_8859_1; } // Fall back encoding: return alternateDecoder.detectE...
206633_20
public static Charset detectEncoding(byte[] input, boolean assume88591IfNotUtf8, FallbackEncodingDetector alternateDecoder) { if (looksLikeValidUtf8(input)) { return Charsets.UTF_8; } if (assume88591IfNotUtf8) { return Charsets.ISO_8859_1; } // Fall back encoding: return alternateDecoder.detectE...
206633_21
public static Charset detectEncoding(byte[] input, boolean assume88591IfNotUtf8, FallbackEncodingDetector alternateDecoder) { if (looksLikeValidUtf8(input)) { return Charsets.UTF_8; } if (assume88591IfNotUtf8) { return Charsets.ISO_8859_1; } // Fall back encoding: return alternateDecoder.detectE...
206633_22
public static Charset detectEncoding(byte[] input, boolean assume88591IfNotUtf8, FallbackEncodingDetector alternateDecoder) { if (looksLikeValidUtf8(input)) { return Charsets.UTF_8; } if (assume88591IfNotUtf8) { return Charsets.ISO_8859_1; } // Fall back encoding: return alternateDecoder.detectE...
206633_23
public static Charset detectEncoding(byte[] input, boolean assume88591IfNotUtf8, FallbackEncodingDetector alternateDecoder) { if (looksLikeValidUtf8(input)) { return Charsets.UTF_8; } if (assume88591IfNotUtf8) { return Charsets.ISO_8859_1; } // Fall back encoding: return alternateDecoder.detectE...
206633_24
public static HttpResponse updateMetadata(HttpResponse response, Map<String, String> values) { Map<String, String> metadata = Maps.newHashMap(response.getMetadata()); // metadata.putAll(values); for (Map.Entry<String, String> val : values.entrySet()) { metadata.put(val.getKey(), val.getValue()); } return ...
206633_25
public HttpResponse fetch(org.apache.shindig.gadgets.http.HttpRequest request) throws GadgetException { HttpUriRequest httpMethod = null; Preconditions.checkNotNull(request); final String methodType = request.getMethod(); final org.apache.http.HttpResponse response; final long started = System.currentTime...
206633_26
public byte[] toByteArraySafe(final HttpEntity entity) throws IOException { if (entity == null) { return null; } InputStream instream = entity.getContent(); if (instream == null) { return ArrayUtils.EMPTY_BYTE_ARRAY; } Preconditions.checkArgument(entity.getContentLength() < Integer.MAX_VALUE, "HTTP ...
206633_27
public byte[] toByteArraySafe(final HttpEntity entity) throws IOException { if (entity == null) { return null; } InputStream instream = entity.getContent(); if (instream == null) { return ArrayUtils.EMPTY_BYTE_ARRAY; } Preconditions.checkArgument(entity.getContentLength() < Integer.MAX_VALUE, "HTTP ...
206633_28
public byte[] toByteArraySafe(final HttpEntity entity) throws IOException { if (entity == null) { return null; } InputStream instream = entity.getContent(); if (instream == null) { return ArrayUtils.EMPTY_BYTE_ARRAY; } Preconditions.checkArgument(entity.getContentLength() < Integer.MAX_VALUE, "HTTP ...
206633_29
public byte[] toByteArraySafe(final HttpEntity entity) throws IOException { if (entity == null) { return null; } InputStream instream = entity.getContent(); if (instream == null) { return ArrayUtils.EMPTY_BYTE_ARRAY; } Preconditions.checkArgument(entity.getContentLength() < Integer.MAX_VALUE, "HTTP ...
206633_30
public byte[] toByteArraySafe(final HttpEntity entity) throws IOException { if (entity == null) { return null; } InputStream instream = entity.getContent(); if (instream == null) { return ArrayUtils.EMPTY_BYTE_ARRAY; } Preconditions.checkArgument(entity.getContentLength() < Integer.MAX_VALUE, "HTTP ...
206633_31
public String createKey(HttpRequest request) { if ((request.getAuthType() != AuthType.NONE) && (request.getSecurityToken() == null)) { throw new IllegalArgumentException( "Cannot sign request without security token: [" + request + ']'); } CacheKeyBuilder keyBuilder = new CacheKeyBuilder() ...
206633_32
public String createKey(HttpRequest request) { if ((request.getAuthType() != AuthType.NONE) && (request.getSecurityToken() == null)) { throw new IllegalArgumentException( "Cannot sign request without security token: [" + request + ']'); } CacheKeyBuilder keyBuilder = new CacheKeyBuilder() ...
206633_33
public String createKey(HttpRequest request) { if ((request.getAuthType() != AuthType.NONE) && (request.getSecurityToken() == null)) { throw new IllegalArgumentException( "Cannot sign request without security token: [" + request + ']'); } CacheKeyBuilder keyBuilder = new CacheKeyBuilder() ...
206633_34
public String createKey(HttpRequest request) { if ((request.getAuthType() != AuthType.NONE) && (request.getSecurityToken() == null)) { throw new IllegalArgumentException( "Cannot sign request without security token: [" + request + ']'); } CacheKeyBuilder keyBuilder = new CacheKeyBuilder() ...
206633_35
public String createKey(HttpRequest request) { if ((request.getAuthType() != AuthType.NONE) && (request.getSecurityToken() == null)) { throw new IllegalArgumentException( "Cannot sign request without security token: [" + request + ']'); } CacheKeyBuilder keyBuilder = new CacheKeyBuilder() ...
206633_36
public String createKey(HttpRequest request) { if ((request.getAuthType() != AuthType.NONE) && (request.getSecurityToken() == null)) { throw new IllegalArgumentException( "Cannot sign request without security token: [" + request + ']'); } CacheKeyBuilder keyBuilder = new CacheKeyBuilder() ...
206633_37
public String createKey(HttpRequest request) { if ((request.getAuthType() != AuthType.NONE) && (request.getSecurityToken() == null)) { throw new IllegalArgumentException( "Cannot sign request without security token: [" + request + ']'); } CacheKeyBuilder keyBuilder = new CacheKeyBuilder() ...
206633_38
public HttpResponse getResponse(HttpRequest request) { if (isCacheable(request)) { String keyString = createKey(request); HttpResponse cached = getResponseImpl(keyString); if (responseStillUsable(cached) && (!cached.isStrictNoCache() || refetchStrictNoCacheAfterMs >= 0)) { return cached; ...
206633_39
public HttpResponse addResponse(HttpRequest request, HttpResponse response) { HttpResponseBuilder responseBuilder; boolean storeStrictNoCacheResources = (refetchStrictNoCacheAfterMs >= 0); if (isCacheable(request, response, storeStrictNoCacheResources)) { if (storeStrictNoCacheResources && response.isStrictNo...
206633_40
public HttpResponse addResponse(HttpRequest request, HttpResponse response) { HttpResponseBuilder responseBuilder; boolean storeStrictNoCacheResources = (refetchStrictNoCacheAfterMs >= 0); if (isCacheable(request, response, storeStrictNoCacheResources)) { if (storeStrictNoCacheResources && response.isStrictNo...
206633_41
public HttpResponse addResponse(HttpRequest request, HttpResponse response) { HttpResponseBuilder responseBuilder; boolean storeStrictNoCacheResources = (refetchStrictNoCacheAfterMs >= 0); if (isCacheable(request, response, storeStrictNoCacheResources)) { if (storeStrictNoCacheResources && response.isStrictNo...
206633_42
public HttpResponse addResponse(HttpRequest request, HttpResponse response) { HttpResponseBuilder responseBuilder; boolean storeStrictNoCacheResources = (refetchStrictNoCacheAfterMs >= 0); if (isCacheable(request, response, storeStrictNoCacheResources)) { if (storeStrictNoCacheResources && response.isStrictNo...
206633_43
@VisibleForTesting HttpResponseBuilder buildStrictNoCacheHttpResponse(HttpResponse response) { HttpResponseBuilder responseBuilder = new HttpResponseBuilder(); copyHeaderIfPresent("Cache-Control", response, responseBuilder); copyHeaderIfPresent("Pragma", response, responseBuilder); responseBuilder.setRefetchStr...
206633_44
@VisibleForTesting HttpResponseBuilder buildStrictNoCacheHttpResponse(HttpResponse response) { HttpResponseBuilder responseBuilder = new HttpResponseBuilder(); copyHeaderIfPresent("Cache-Control", response, responseBuilder); copyHeaderIfPresent("Pragma", response, responseBuilder); responseBuilder.setRefetchStr...
206633_45
public HttpResponse removeResponse(HttpRequest request) { String keyString = createKey(request); HttpResponse response = getResponseImpl(keyString); removeResponseImpl(keyString); if (responseStillUsable(response)) { return response; } return null; }
206633_46
public void invalidateApplicationResources(Set<Uri> uris, SecurityToken token) { // TODO Add checks on content for (Uri uri : uris) { httpCache.removeResponse(new HttpRequest(uri)); } }
206633_47
public void invalidateUserResources(Set<String> opensocialIds, SecurityToken token) { for (String userId : opensocialIds) { // Allocate a new mark for each user invalidationEntries.addElement(getKey(userId, token), marker.incrementAndGet()); } }
206633_48
public void invalidateApplicationResources(Set<Uri> uris, SecurityToken token) { // TODO Add checks on content for (Uri uri : uris) { httpCache.removeResponse(new HttpRequest(uri)); } }
206633_49
public void invalidateUserResources(Set<String> opensocialIds, SecurityToken token) { for (String userId : opensocialIds) { // Allocate a new mark for each user invalidationEntries.addElement(getKey(userId, token), marker.incrementAndGet()); } }
206633_50
public void invalidateUserResources(Set<String> opensocialIds, SecurityToken token) { for (String userId : opensocialIds) { // Allocate a new mark for each user invalidationEntries.addElement(getKey(userId, token), marker.incrementAndGet()); } }
206633_51
public void invalidateUserResources(Set<String> opensocialIds, SecurityToken token) { for (String userId : opensocialIds) { // Allocate a new mark for each user invalidationEntries.addElement(getKey(userId, token), marker.incrementAndGet()); } }
206633_52
public void invalidateUserResources(Set<String> opensocialIds, SecurityToken token) { for (String userId : opensocialIds) { // Allocate a new mark for each user invalidationEntries.addElement(getKey(userId, token), marker.incrementAndGet()); } }
206633_53
public HttpResponseBuilder addHeader(String name, String value) { if (name != null) { headers.put(name, value); incrementNumChanges(); } return this; }
206633_54
public HttpResponseBuilder addAllHeaders(Map<String, ? extends List<String>> headers) { for (Map.Entry<String,? extends List<String>> entry : headers.entrySet()) { this.headers.putAll(entry.getKey(), entry.getValue()); incrementNumChanges(); } return this; }
206633_55
public HttpResponseBuilder setExpirationTime(long expirationTime) { headers.removeAll("Cache-Control"); headers.removeAll("Pragma"); headers.put("Expires", DateUtil.formatRfc1123Date(expirationTime)); incrementNumChanges(); return this; }
206633_56
public HttpResponseBuilder setCacheControlMaxAge(long expirationTime) { String cacheControl = getHeader("Cache-Control"); List<String> directives = Lists.newArrayList(); if (cacheControl != null) { for (String directive : StringUtils.split(cacheControl, ',')) { directive = directive.trim(); if (!d...
206633_57
public HttpResponseBuilder setCacheTtl(int cacheTtl) { headers.removeAll("Pragma"); headers.removeAll("Expires"); headers.replaceValues("Cache-Control", ImmutableList.of("public,max-age=" + cacheTtl)); incrementNumChanges(); return this; }
206633_58
public HttpResponseBuilder setStrictNoCache() { headers.replaceValues("Cache-Control", NO_CACHE_HEADER); headers.replaceValues("Pragma", NO_CACHE_HEADER); headers.removeAll("Expires"); incrementNumChanges(); return this; }
206633_59
public HttpResponseBuilder setEncoding(Charset charset) { Collection<String> values = headers.get("Content-Type"); if (!values.isEmpty()) { String contentType = values.iterator().next(); StringBuilder newContentTypeBuilder = new StringBuilder(""); // Remove previously set charset: String[] parts = S...
206633_60
public HttpResponseBuilder setResponseString(String body) { setContentBytes(CharsetUtil.getUtf8Bytes(body), Charsets.UTF_8); return this; }
206633_61
public HttpResponseBuilder setResponse(byte[] responseBytes) { if (responseBytes == null) { responseBytes = ArrayUtils.EMPTY_BYTE_ARRAY; } byte[] newBytes = new byte[responseBytes.length]; System.arraycopy(responseBytes, 0, newBytes, 0, responseBytes.length); setContentBytes(newBytes); return this; }
206633_62
public HttpResponseBuilder setResponseNoCopy(byte[] responseBytes) { if (responseBytes == null) { responseBytes = ArrayUtils.EMPTY_BYTE_ARRAY; } setContentBytes(responseBytes); return this; }
206633_63
public String getHeader(String name) { List<String> headerList = getHeaders(name); if (headerList.isEmpty()) { return null; } else { return headerList.get(0); } }
206633_64
public String getHeader(String name) { List<String> headerList = getHeaders(name); if (headerList.isEmpty()) { return null; } else { return headerList.get(0); } }
206633_65
public Map<String, List<String>> getHeaders() { return headers; }
206633_66
public boolean getFollowRedirects() { return followRedirects; }
206633_67
public String getEncoding() { return encoding.name(); }
206633_68
public String getResponseAsString() { if (responseString == null) { responseString = encoding.decode(ByteBuffer.wrap(responseBytes)).toString(); // Strip BOM if present. if (responseString.length() > 0 && responseString.codePointAt(0) == 0xFEFF) { responseString = responseString.substring(1); } ...
206633_69
public String getResponseAsString() { if (responseString == null) { responseString = encoding.decode(ByteBuffer.wrap(responseBytes)).toString(); // Strip BOM if present. if (responseString.length() > 0 && responseString.codePointAt(0) == 0xFEFF) { responseString = responseString.substring(1); } ...
206633_70
public String getEncoding() { return encoding.name(); }
206633_71
public String getEncoding() { return encoding.name(); }
206633_72
public String getEncoding() { return encoding.name(); }
206633_73
public String getEncoding() { return encoding.name(); }
206633_74
public boolean isStrictNoCache() { if (isError() && !NEGATIVE_CACHING_EXEMPT_STATUS.contains(httpStatusCode)) { return false; } String cacheControl = getHeader(HttpHeaders.CACHE_CONTROL); if (cacheControl != null) { String[] directives = StringUtils.split(cacheControl, ','); for (String directive : ...
206633_75
public long getCacheExpiration() { if (isError() && !NEGATIVE_CACHING_EXEMPT_STATUS.contains(httpStatusCode)) { // If the server provides a Retry-After header use that as the cacheTtl String retryAfter = this.getHeader("Retry-After"); if (retryAfter != null) { if (StringUtils.isNumeric(retryAfter)) ...
206633_76
public long getCacheExpiration() { if (isError() && !NEGATIVE_CACHING_EXEMPT_STATUS.contains(httpStatusCode)) { // If the server provides a Retry-After header use that as the cacheTtl String retryAfter = this.getHeader("Retry-After"); if (retryAfter != null) { if (StringUtils.isNumeric(retryAfter)) ...
206633_77
public long getCacheExpiration() { if (isError() && !NEGATIVE_CACHING_EXEMPT_STATUS.contains(httpStatusCode)) { // If the server provides a Retry-After header use that as the cacheTtl String retryAfter = this.getHeader("Retry-After"); if (retryAfter != null) { if (StringUtils.isNumeric(retryAfter)) ...
206633_78
public long getCacheExpiration() { if (isError() && !NEGATIVE_CACHING_EXEMPT_STATUS.contains(httpStatusCode)) { // If the server provides a Retry-After header use that as the cacheTtl String retryAfter = this.getHeader("Retry-After"); if (retryAfter != null) { if (StringUtils.isNumeric(retryAfter)) ...
206633_79
public long getCacheExpiration() { if (isError() && !NEGATIVE_CACHING_EXEMPT_STATUS.contains(httpStatusCode)) { // If the server provides a Retry-After header use that as the cacheTtl String retryAfter = this.getHeader("Retry-After"); if (retryAfter != null) { if (StringUtils.isNumeric(retryAfter)) ...
206633_80
public long getCacheExpiration() { if (isError() && !NEGATIVE_CACHING_EXEMPT_STATUS.contains(httpStatusCode)) { // If the server provides a Retry-After header use that as the cacheTtl String retryAfter = this.getHeader("Retry-After"); if (retryAfter != null) { if (StringUtils.isNumeric(retryAfter)) ...
206633_81
public long getCacheTtl() { long expiration = getCacheExpiration(); if (expiration != -1) { return expiration - getTimeSource().currentTimeMillis(); } return -1; }
206633_82
public String getHeader(String name) { Collection<String> headerList = getHeaders(name); if (headerList.isEmpty()) { return null; } else { return headerList.iterator().next(); } }
206633_83
public Multimap<String, String> getHeaders() { return headers; }
206633_84
public boolean isError() { return httpStatusCode >= 400; }
206633_85
public long getCacheExpiration() { if (isError() && !NEGATIVE_CACHING_EXEMPT_STATUS.contains(httpStatusCode)) { // If the server provides a Retry-After header use that as the cacheTtl String retryAfter = this.getHeader("Retry-After"); if (retryAfter != null) { if (StringUtils.isNumeric(retryAfter)) ...
206633_86
public long getCacheExpiration() { if (isError() && !NEGATIVE_CACHING_EXEMPT_STATUS.contains(httpStatusCode)) { // If the server provides a Retry-After header use that as the cacheTtl String retryAfter = this.getHeader("Retry-After"); if (retryAfter != null) { if (StringUtils.isNumeric(retryAfter)) ...
206633_87
public long getCacheExpiration() { if (isError() && !NEGATIVE_CACHING_EXEMPT_STATUS.contains(httpStatusCode)) { // If the server provides a Retry-After header use that as the cacheTtl String retryAfter = this.getHeader("Retry-After"); if (retryAfter != null) { if (StringUtils.isNumeric(retryAfter)) ...
206633_88
public boolean shouldRefetch() { // Time after which resource should be refetched. long refetchExpiration = isStrictNoCache() ? date + getRefetchStrictNoCacheAfterMs() : getCacheExpiration(); return refetchExpiration <= getTimeSource().currentTimeMillis(); }
206633_89
public boolean shouldRefetch() { // Time after which resource should be refetched. long refetchExpiration = isStrictNoCache() ? date + getRefetchStrictNoCacheAfterMs() : getCacheExpiration(); return refetchExpiration <= getTimeSource().currentTimeMillis(); }