Skip to content

Package: MapCacheManager

MapCacheManager

nameinstructionbranchcomplexitylinemethod
close()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createCache(String, Configuration)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
destroyCache(String)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
enableManagement(String, boolean)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
enableStatistics(String, boolean)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getCache(String)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getCache(String, Class, Class)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getCacheNames()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getCachingProvider()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getClassLoader()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getInstance()
M: 17 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
getProperties()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getURI()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isClosed()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
unwrap(Class)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2020, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.qa.common.cache;
14:
15: import javax.cache.Cache;
16: import javax.cache.CacheManager;
17: import javax.cache.configuration.Configuration;
18: import javax.cache.spi.CachingProvider;
19: import java.net.URI;
20: import java.util.Properties;
21:
22: public class MapCacheManager implements CacheManager {
23:
24: private static MapCacheManager instance;
25:
26: private MapCacheManager() {
27:
28: }
29:
30: public static MapCacheManager getInstance() {
31:• if (instance == null) {
32: synchronized (MapCacheManager.class) {
33:• if (instance == null) {
34: instance = new MapCacheManager();
35: }
36: }
37: }
38: return instance;
39: }
40:
41: @Override
42: public CachingProvider getCachingProvider() {
43: throw new UnsupportedOperationException();
44: }
45:
46: @Override
47: public URI getURI() {
48: throw new UnsupportedOperationException();
49: }
50:
51: @Override
52: public ClassLoader getClassLoader() {
53: throw new UnsupportedOperationException();
54: }
55:
56: @Override
57: public Properties getProperties() {
58: throw new UnsupportedOperationException();
59: }
60:
61: @Override
62: public <K, V, C extends Configuration<K, V>> Cache<K, V> createCache(String cacheName, C configuration) throws IllegalArgumentException {
63: //Class<K> kClass = configuration.getKeyType();
64: //Class<V> vClass = configuration.getValueType();
65: return new MapCache<>();
66: }
67:
68: @Override
69: public <K, V> Cache<K, V> getCache(String cacheName, Class<K> keyType, Class<V> valueType) {
70: throw new UnsupportedOperationException();
71: }
72:
73: @Override
74: public <K, V> Cache<K, V> getCache(String cacheName) {
75: throw new UnsupportedOperationException();
76: }
77:
78: @Override
79: public Iterable<String> getCacheNames() {
80: throw new UnsupportedOperationException();
81: }
82:
83: @Override
84: public void destroyCache(String cacheName) {
85: throw new UnsupportedOperationException();
86: }
87:
88: @Override
89: public void enableManagement(String cacheName, boolean enabled) {
90: throw new UnsupportedOperationException();
91: }
92:
93: @Override
94: public void enableStatistics(String cacheName, boolean enabled) {
95: throw new UnsupportedOperationException();
96: }
97:
98: @Override
99: public void close() {
100: throw new UnsupportedOperationException();
101: }
102:
103: @Override
104: public boolean isClosed() {
105: throw new UnsupportedOperationException();
106: }
107:
108: @Override
109: public <T> T unwrap(Class<T> clazz) {
110: throw new UnsupportedOperationException();
111: }
112: }