Class CoexpressionCacheImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.association.coexpression.CoexpressionCacheImpl
-
- All Implemented Interfaces:
InitializingBean,CoexpressionCache
@Component public class CoexpressionCacheImpl extends Object implements InitializingBean, CoexpressionCache
Configures the cache for gene2gene coexpression.- Author:
- paul
-
-
Field Summary
-
Fields inherited from interface ubic.gemma.persistence.service.association.coexpression.CoexpressionCache
CACHE_QUERY_STRINGENCY
-
-
Constructor Summary
Constructors Constructor Description CoexpressionCacheImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()Initialize the cache; if it already exists it will not be recreated.voidcacheCoexpression(Long geneId, Collection<CoexpressionValueObject> r)voidcacheCoexpression(Map<Long,List<CoexpressionValueObject>> r)voidclearCache()Remove all elements from the cache.List<CoexpressionValueObject>get(Long geneId)booleanisEnabled()booleanremove(Long id)intremove(Collection<Long> genes)Bulk remove from cache.voidshutdown()
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet()
Initialize the cache; if it already exists it will not be recreated.- Specified by:
afterPropertiesSetin interfaceInitializingBean
-
cacheCoexpression
public void cacheCoexpression(Long geneId, Collection<CoexpressionValueObject> r)
- Specified by:
cacheCoexpressionin interfaceCoexpressionCache
-
cacheCoexpression
public void cacheCoexpression(Map<Long,List<CoexpressionValueObject>> r)
- Specified by:
cacheCoexpressionin interfaceCoexpressionCache
-
clearCache
public void clearCache()
Description copied from interface:CoexpressionCacheRemove all elements from the cache.- Specified by:
clearCachein interfaceCoexpressionCache
-
get
public List<CoexpressionValueObject> get(Long geneId)
- Specified by:
getin interfaceCoexpressionCache- Parameters:
geneId- gene id- Returns:
- results sorted in descending order of support, or null if the gene was not in the cache
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceCoexpressionCache
-
remove
public int remove(Collection<Long> genes)
Description copied from interface:CoexpressionCacheBulk remove from cache.- Specified by:
removein interfaceCoexpressionCache- Parameters:
genes- genes- Returns:
- number of cache entries affected
-
remove
public boolean remove(Long id)
- Specified by:
removein interfaceCoexpressionCache
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceCoexpressionCache
-
-