Class CoexpressionCacheImpl
java.lang.Object
ubic.gemma.persistence.service.association.coexpression.CoexpressionCacheImpl
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,CoexpressionCache
@Component
public class CoexpressionCacheImpl
extends Object
implements org.springframework.beans.factory.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 -
Method Summary
Modifier and TypeMethodDescriptionvoidInitialize the cache; if it already exists it will not be recreated.voidcacheCoexpression(Long geneId, Collection<CoexpressionValueObject> r) voidvoidRemove all elements from the cache.booleanbooleanintremove(Collection<Long> genes) Bulk remove from cache.voidshutdown()
-
Constructor Details
-
CoexpressionCacheImpl
public CoexpressionCacheImpl()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()Initialize the cache; if it already exists it will not be recreated.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
cacheCoexpression
- Specified by:
cacheCoexpressionin interfaceCoexpressionCache
-
cacheCoexpression
- Specified by:
cacheCoexpressionin interfaceCoexpressionCache
-
clearCache
public void clearCache()Description copied from interface:CoexpressionCacheRemove all elements from the cache.- Specified by:
clearCachein interfaceCoexpressionCache
-
get
- 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
Description copied from interface:CoexpressionCacheBulk remove from cache.- Specified by:
removein interfaceCoexpressionCache- Parameters:
genes- genes- Returns:
- number of cache entries affected
-
remove
- Specified by:
removein interfaceCoexpressionCache
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceCoexpressionCache
-