public class CacheTestUtils extends Object
Constructor and Description |
---|
CacheTestUtils() |
Modifier and Type | Method and Description |
---|---|
static Cache.Entry |
makeRandomCacheEntry(byte[] data)
Like
makeRandomCacheEntry(byte[], boolean, boolean) but
defaults to an unexpired entry. |
static Cache.Entry |
makeRandomCacheEntry(byte[] data,
boolean isExpired,
boolean needsRefresh)
Makes a random cache entry.
|
public static Cache.Entry makeRandomCacheEntry(byte[] data, boolean isExpired, boolean needsRefresh)
data
- Data to use, or null to use random dataisExpired
- Whether the TTLs should be set such that this entry is expiredneedsRefresh
- Whether the TTLs should be set such that this entry needs refreshpublic static Cache.Entry makeRandomCacheEntry(byte[] data)
makeRandomCacheEntry(byte[], boolean, boolean)
but
defaults to an unexpired entry.