framework/base/src/org/ofbiz/base/util/cache/UtilCache.java
UtilCache
has 127 methods (exceeds 20 allowed). Consider refactoring. Open
Open
@SuppressWarnings("serial")
public class UtilCache<K, V> implements Serializable, EvictionListener<Object, CacheLine<V>> {
public static final String SEPARATOR = "::"; // cache key separator
public static final Pattern SEPARATOR_PAT = Pattern.compile(SEPARATOR); // SCIPIO: 2.1.0: Added
Builder
has 42 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public static class Builder<K, V> {
String baseName;
String resource;
Boolean autoScope;
List<String> propNames;
Method getOrCreateUtilCache
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <K, V> UtilCache<K, V> getOrCreateUtilCache(String name, int sizeLimit, int maxInMemory, long expireDelay, boolean useSoftReference, String keyFormat, Map<String, ?> indexDefs, String... propNames) {
Method getOrCreateUtilCache
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <K, V> UtilCache<K, V> getOrCreateUtilCache(String name, int sizeLimit, int maxInMemory, long expireTime, boolean useSoftReference, boolean useFileSystemStore, String... names) {
Method createUtilCache
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <K, V> UtilCache<K, V> createUtilCache(String name, int sizeLimit, int maxInMemory, long expireTime, boolean useSoftReference, boolean useFileSystemStore, String... propNames) {
Method createOnlyUtilCache
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <K, V> UtilCache<K, V> createOnlyUtilCache(String name, int sizeLimit, int maxInMemory, long expireDelay, boolean useSoftReference, String... propNames) {
Method createUtilCache
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <K, V> UtilCache<K, V> createUtilCache(String name, int sizeLimit, int maxInMemory, long expireTime, boolean useSoftReference, boolean useFileSystemStore) {
Method createUtilCache
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <K, V> UtilCache<K, V> createUtilCache(String name, int sizeLimit, int maxInMemory, long expireDelay, boolean useSoftReference, String... propNames) {
Avoid deeply nested control flow statements. Open
Open
if (ikfValueOld == null) {
ikfNew.put(entry.getKey(), entry.getValue());
} else if (ikfValueOld instanceof Map) {
Map<String, Object> newMap = new LinkedHashMap<>(UtilGenerics.cast(ikfValueOld));
newMap.putAll(UtilGenerics.cast(entry.getValue()));
Method getOrCreateUtilCache
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <K, V> UtilCache<K, V> getOrCreateUtilCache(String name, int sizeLimit, int maxInMemory, long expireDelay, boolean useSoftReference, String... propNames) {
Method createUtilCache
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <K, V> UtilCache<K, V> createUtilCache(String name, int sizeLimit, int maxInMemory, long expireDelay, boolean useSoftReference) {
Avoid too many return
statements within this method. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return 0;