|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
DummySharedInMemoryCacheLoader.java | - | 100% | 100% | 100% |
|
1 | package org.jboss.cache.loader; | |
2 | ||
3 | import org.jboss.cache.Fqn; | |
4 | ||
5 | import java.util.Map; | |
6 | import java.util.concurrent.ConcurrentHashMap; | |
7 | ||
8 | /** | |
9 | * An extension of the {@link org.jboss.cache.loader.DummyInMemoryCacheLoader} that uses static maps for data, children, | |
10 | * etc. so it can be shared across instances, emulating a shared database or filesystem cache loader. | |
11 | * | |
12 | * @author <a href="mailto:manik@jboss.org">Manik Surtani</a> | |
13 | * @since 2.0.0 | |
14 | */ | |
15 | public class DummySharedInMemoryCacheLoader extends DummyInMemoryCacheLoader | |
16 | { | |
17 | protected static final Map<Fqn, DummyNode> SHARED_NODES_MAP = new ConcurrentHashMap<Fqn, DummyNode>(); | |
18 | ||
19 | 12 | public DummySharedInMemoryCacheLoader() |
20 | { | |
21 | 12 | nodes = SHARED_NODES_MAP; |
22 | } | |
23 | } |
|