org.mindswap.pellet.tableau.cache
Class ConceptCacheLRU
java.lang.Object
org.mindswap.pellet.tableau.cache.AbstractConceptCache
org.mindswap.pellet.tableau.cache.ConceptCacheLRU
- All Implemented Interfaces:
- java.util.Map<aterm.ATermAppl,CachedNode>, ConceptCache
public class ConceptCacheLRU
- extends AbstractConceptCache
- implements ConceptCache
Title:
Description: LRU implementation of ConceptCache. Primitive concepts and their
negation are always kept in the cache. The least recently used complex
concept will be removed from the cache if the max size is reached.
Copyright: Copyright (c) 2007
Company: Clark & Parsia, LLC.
- Author:
- Ron Alford
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
ConceptCacheLRU
public ConceptCacheLRU(KnowledgeBase kb)
- Creates an empty ConceptCacheImpl with no size restrictions
- Parameters:
maxSize
-
ConceptCacheLRU
public ConceptCacheLRU(KnowledgeBase kb,
int maxSize)
- Creates an empty cache with at most
maxSize
elements which
are neither named or negations of names.
- Parameters:
maxSize
-
getSafety
public CacheSafety getSafety()
- Description copied from interface:
ConceptCache
- Returns safety checker that tells which concepts are safe to cache.
- Specified by:
getSafety
in interface ConceptCache
- Returns:
- safety checker
clear
public void clear()
- Specified by:
clear
in interface java.util.Map<aterm.ATermAppl,CachedNode>
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey
in interface java.util.Map<aterm.ATermAppl,CachedNode>
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValue
in interface java.util.Map<aterm.ATermAppl,CachedNode>
entrySet
public java.util.Set<java.util.Map.Entry<aterm.ATermAppl,CachedNode>> entrySet()
- Specified by:
entrySet
in interface java.util.Map<aterm.ATermAppl,CachedNode>
get
public CachedNode get(java.lang.Object key)
- Specified by:
get
in interface java.util.Map<aterm.ATermAppl,CachedNode>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface java.util.Map<aterm.ATermAppl,CachedNode>
keySet
public java.util.Set<aterm.ATermAppl> keySet()
- Specified by:
keySet
in interface java.util.Map<aterm.ATermAppl,CachedNode>
put
public CachedNode put(aterm.ATermAppl key,
CachedNode value)
- Specified by:
put
in interface java.util.Map<aterm.ATermAppl,CachedNode>
putAll
public void putAll(java.util.Map<? extends aterm.ATermAppl,? extends CachedNode> t)
- Specified by:
putAll
in interface java.util.Map<aterm.ATermAppl,CachedNode>
remove
public CachedNode remove(java.lang.Object key)
- Specified by:
remove
in interface java.util.Map<aterm.ATermAppl,CachedNode>
size
public int size()
- Specified by:
size
in interface java.util.Map<aterm.ATermAppl,CachedNode>
values
public java.util.Collection<CachedNode> values()
- Specified by:
values
in interface java.util.Map<aterm.ATermAppl,CachedNode>
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2004 Evren Sirin. All Rights Reserved.