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 TypeMethodDescriptionvoid
Initialize the cache; if it already exists it will not be recreated.void
cacheCoexpression
(Long geneId, Collection<CoexpressionValueObject> r) void
void
Remove all elements from the cache.boolean
boolean
int
remove
(Collection<Long> genes) Bulk remove from cache.void
shutdown()
-
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:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
cacheCoexpression
- Specified by:
cacheCoexpression
in interfaceCoexpressionCache
-
cacheCoexpression
- Specified by:
cacheCoexpression
in interfaceCoexpressionCache
-
clearCache
public void clearCache()Description copied from interface:CoexpressionCache
Remove all elements from the cache.- Specified by:
clearCache
in interfaceCoexpressionCache
-
get
- Specified by:
get
in 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:
isEnabled
in interfaceCoexpressionCache
-
remove
Description copied from interface:CoexpressionCache
Bulk remove from cache.- Specified by:
remove
in interfaceCoexpressionCache
- Parameters:
genes
- genes- Returns:
- number of cache entries affected
-
remove
- Specified by:
remove
in interfaceCoexpressionCache
-
shutdown
public void shutdown()- Specified by:
shutdown
in interfaceCoexpressionCache
-