Package org.sonar.java.caching
Class CacheContextImpl
java.lang.Object
org.sonar.java.caching.CacheContextImpl
- All Implemented Interfaces:
CacheContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Can be set totrue
orfalse
to override whether the cache is enabled or not. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Describes whether caching facilities are available in this context.static CacheContextImpl
of
(org.sonar.api.batch.sensor.SensorContext context)
-
Field Details
-
SONAR_CACHING_ENABLED_KEY
Can be set totrue
orfalse
to override whether the cache is enabled or not. Note that even if this is set to true, the engine may not use caching anyway, if the server does not support it.- See Also:
-
-
Method Details
-
of
-
isCacheEnabled
public boolean isCacheEnabled()Description copied from interface:CacheContext
Describes whether caching facilities are available in this context.- Specified by:
isCacheEnabled
in interfaceCacheContext
- Returns:
- True if the server allows caching, false otherwise
-
getReadCache
- Specified by:
getReadCache
in interfaceCacheContext
-
getWriteCache
- Specified by:
getWriteCache
in interfaceCacheContext
-