MCPcopy Create free account
hub / github.com/banq/jdonframework / containsKey

Method containsKey

src/main/java/com/jdon/cache/UtilCache.java:417–429  ·  view source on GitHub ↗

Returns a boolean specifying whether or not an element with the specified key is in the cache. If the requested element hasExpired, it is removed before it is looked up which causes the function to return false. @param key The key for the element, used to reference it in the hastables

(Object key)

Source from the content-addressed store, hash-verified

415 * specified key, otherwise false
416 */
417 public boolean containsKey(Object key) {
418 CacheLine line = (CacheLine) cacheLineTable.get(key);
419
420 if (hasExpired(line)) {
421 removeObject(key);
422 line = null;
423 }
424 if (line != null) {
425 return true;
426 } else {
427 return false;
428 }
429 }
430
431 /**
432 * Returns a boolean specifying whether or not the element corresponding to

Callers 15

finishMethod · 0.80
putIfAbsentMethod · 0.80
containMethod · 0.80
putMethod · 0.80
getMethod · 0.80
containsThisClassMethod · 0.80
registerComponentMethod · 0.80
setSessionContextMethod · 0.80
containMethod · 0.80
fireToModelMethod · 0.80
getPropertyMethod · 0.80

Calls 3

hasExpiredMethod · 0.95
removeObjectMethod · 0.95
getMethod · 0.65

Tested by 1

finishMethod · 0.64