EMMA Coverage Report (generated Thu Jan 20 11:39:44 EST 2011)
[all classes][com.hammurapi.eventbus.local]

COVERAGE SUMMARY FOR SOURCE FILE [LocalEventStoreImpl.java]

nameclass, %method, %block, %line, %
LocalEventStoreImpl.java80%  (4/5)50%  (6/12)49%  (33/67)61%  (11/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class LocalEventStoreImpl$LocalEventLiveView0%   (0/1)0%   (0/2)0%   (0/10)0%   (0/3)
LocalEventStoreImpl$LocalEventLiveView (LocalEventStore, Predicate): void 0%   (0/1)0%   (0/5)0%   (0/2)
createUnmodifiableFacade (): LocalEventStore 0%   (0/1)0%   (0/5)0%   (0/1)
     
class LocalEventStoreImpl$LocalEventDeputyStore100% (1/1)25%  (1/4)22%  (5/23)40%  (2/5)
createDeputy (): LocalEventStore 0%   (0/1)0%   (0/7)0%   (0/1)
createLiveView (Predicate): LocalEventStore 0%   (0/1)0%   (0/6)0%   (0/1)
createUnmodifiableFacade (): LocalEventStore 0%   (0/1)0%   (0/5)0%   (0/1)
LocalEventStoreImpl$LocalEventDeputyStore (AbstractStore, ReadWriteLock): void 100% (1/1)100% (5/5)100% (2/2)
     
class LocalEventStoreImpl100% (1/1)75%  (3/4)73%  (16/22)80%  (4/5)
createLiveView (Predicate): LocalEventStore 0%   (0/1)0%   (0/6)0%   (0/1)
LocalEventStoreImpl (LocalEventStoreImpl$Config): void 100% (1/1)100% (4/4)100% (2/2)
createDeputy (): LocalEventStore 100% (1/1)100% (7/7)100% (1/1)
createUnmodifiableFacade (): LocalEventStore 100% (1/1)100% (5/5)100% (1/1)
     
class LocalEventStoreImpl$Config100% (1/1)100% (1/1)100% (8/8)100% (3/3)
LocalEventStoreImpl$Config (): void 100% (1/1)100% (8/8)100% (3/3)
     
class LocalEventStoreImpl$LocalEventUnmodifiableStore100% (1/1)100% (1/1)100% (4/4)100% (2/2)
LocalEventStoreImpl$LocalEventUnmodifiableStore (LocalEventStore): void 100% (1/1)100% (4/4)100% (2/2)

1package com.hammurapi.eventbus.local;
2 
3import java.util.concurrent.locks.ReadWriteLock;
4 
5import com.hammurapi.eventbus.AbstractEventBus;
6import com.hammurapi.eventbus.HandleExtractor;
7import com.hammurapi.extract.Predicate;
8import com.hammurapi.store.AbstractStore;
9import com.hammurapi.store.DeputyStore;
10import com.hammurapi.store.LiveView;
11import com.hammurapi.store.UnmodifiableStore;
12import com.hammurapi.store.local.LocalStoreBase;
13 
14/**
15 * Implementation of event store.
16 * @author Pavel Vlasov
17 *
18 * @param <E>
19 * @param <P>
20 * @param <C>
21 */
22public class LocalEventStoreImpl<E,P extends Comparable<P>,C> extends LocalStoreBase<AbstractEventBus.Handle<E,P,C,Long>, E, LocalEventStore<E,P,C>> implements LocalEventStore<E,P,C> {
23 
24        /**
25         * Config class with bound generic parameters. 
26         * @author Pavel Vlasov
27         *
28         */
29        public static class Config<E,P extends Comparable<P>,C> extends LocalStoreBase.Config<AbstractEventBus.Handle<E,P,C,Long>, E, LocalEventStore<E,P,C>> {
30                
31                public Config() {
32                        setPrimaryKeyExtractor(new HandleExtractor<E, P, C, Long, AbstractEventBus.Handle<E,P,C,Long>, LocalEventStore<E,P,C>>());
33                }
34        }
35 
36        public LocalEventStoreImpl(Config<E,P,C> config) {
37                super(config);
38        }
39        
40        protected static class LocalEventDeputyStore<E,P extends Comparable<P>,C> extends DeputyStore<AbstractEventBus.Handle<E,P,C,Long>, E, LocalEventStore<E,P,C>> implements LocalEventStore<E,P,C> {
41 
42                public LocalEventDeputyStore(
43                                AbstractStore<AbstractEventBus.Handle<E, P, C, Long>, E, LocalEventStore<E, P, C>> master,
44                                ReadWriteLock masterLock) {
45                        super(master, masterLock);
46                }
47 
48                @Override
49                protected LocalEventStore<E,P,C> createDeputy() {
50                        return new LocalEventDeputyStore<E,P,C>(this, createMasterLock());
51                }
52                
53                @Override
54                public LocalEventStore<E,P,C> createUnmodifiableFacade() {
55                        return new LocalEventUnmodifiableStore<E,P,C>(this);
56                }
57 
58                @Override
59                protected LocalEventStore<E,P,C> createLiveView(Predicate<AbstractEventBus.Handle<E,P,C,Long>, LocalEventStore<E,P,C>> selector) {
60                        return new LocalEventLiveView<E,P,C>(this, selector);
61                }
62                
63        }
64        
65        protected static class LocalEventUnmodifiableStore<E,P extends Comparable<P>,C> extends UnmodifiableStore<AbstractEventBus.Handle<E,P,C,Long>, E, LocalEventStore<E,P,C>> implements LocalEventStore<E,P,C> {
66 
67                public LocalEventUnmodifiableStore(LocalEventStore<E, P, C> master) {
68                        super(master);
69                }
70 
71                
72        }
73        
74        protected static class LocalEventLiveView<E,P extends Comparable<P>,C> extends LiveView<AbstractEventBus.Handle<E,P,C,Long>, E, LocalEventStore<E,P,C>> implements LocalEventStore<E,P,C> {
75                
76                public LocalEventLiveView(
77                                LocalEventStore<E, P, C> master,
78                                Predicate<AbstractEventBus.Handle<E, P, C, Long>, LocalEventStore<E, P, C>> selector) {
79                        super(master, selector);
80                }
81 
82                @Override
83                public LocalEventStore<E,P,C> createUnmodifiableFacade() {
84                        return new LocalEventUnmodifiableStore(this);
85                }
86                
87        }
88 
89        @Override
90        protected LocalEventStore<E,P,C> createDeputy() {
91                return new LocalEventDeputyStore<E,P,C>(this, createMasterLock());
92        }
93        
94        @Override
95        public LocalEventStore<E,P,C> createUnmodifiableFacade() {
96                return new LocalEventUnmodifiableStore<E,P,C>(this);
97        }
98 
99        @Override
100        protected LocalEventStore<E,P,C> createLiveView(Predicate<AbstractEventBus.Handle<E,P,C,Long>, LocalEventStore<E,P,C>> selector) {
101                return new LocalEventLiveView<E,P,C>(this, selector);
102        }
103 
104}

[all classes][com.hammurapi.eventbus.local]
EMMA 2.0.5312 EclEmma Fix 2 (C) Vladimir Roubtsov