Class DummyCache
java.lang.Object
org.sonar.java.caching.DummyCache
- All Implemented Interfaces:
JavaReadCache,JavaWriteCache
-
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.voidwrite(String key, InputStream data) Save a new entry in the cache.
-
Constructor Details
-
DummyCache
public DummyCache()
-
-
Method Details
-
read
Description copied from interface:JavaReadCacheReturns an input stream for the data cached with the providedkey. It is the responsibility of the caller to close the stream.- Specified by:
readin interfaceJavaReadCache
-
readBytes
- Specified by:
readBytesin interfaceJavaReadCache- Returns:
- the array of bytes stored for the given key, if any.
nullotherwise.
-
contains
Description copied from interface:JavaReadCacheChecks whether the cache contains the providedkey.- Specified by:
containsin interfaceJavaReadCache
-
write
Description copied from interface:JavaWriteCacheSave a new entry in the cache. The stream will be consumed immediately.- Specified by:
writein interfaceJavaWriteCache
-
write
Description copied from interface:JavaWriteCacheSave a new entry in the cache.- Specified by:
writein interfaceJavaWriteCache
-
copyFromPrevious
Description copied from interface:JavaWriteCacheCopy a cached entry from the previous cache to the new one.- Specified by:
copyFromPreviousin interfaceJavaWriteCache
-