Package org.sonar.python.caching
Class DummyCache
java.lang.Object
org.sonar.python.caching.DummyCache
- All Implemented Interfaces:
PythonReadCache,PythonWriteCache
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether the cache contains the providedkey.voidcopyFromPrevious(String key) Copy a cached entry from the previous cache to the new one.Returns an input stream for the data cached with the providedkey.byte[]voidSave a new entry in the cache.
-
Constructor Details
-
DummyCache
public DummyCache()
-
-
Method Details
-
read
Description copied from interface:PythonReadCacheReturns an input stream for the data cached with the providedkey. It is the responsibility of the caller to close the stream.- Specified by:
readin interfacePythonReadCache
-
readBytes
- Specified by:
readBytesin interfacePythonReadCache- Returns:
- the array of bytes stored for the given key, if any.
nullotherwise.
-
contains
Description copied from interface:PythonReadCacheChecks whether the cache contains the providedkey.- Specified by:
containsin interfacePythonReadCache
-
write
Description copied from interface:PythonWriteCacheSave a new entry in the cache.- Specified by:
writein interfacePythonWriteCache
-
copyFromPrevious
Description copied from interface:PythonWriteCacheCopy a cached entry from the previous cache to the new one.- Specified by:
copyFromPreviousin interfacePythonWriteCache
-