1 package org.apachi.onami.lifecycle.warmup;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import javax.inject.Inject;
23 import javax.inject.Singleton;
24 import org.apache.onami.lifecycle.warmup.WarmUp;
25
26 public class Dag4
27 {
28
29
30
31
32
33
34
35
36
37
38
39
40 @SuppressWarnings( "UnusedParameters" )
41 @Singleton
42 public static class A
43 {
44 private final Recorder recorder;
45
46 @Inject
47 public A( Recorder recorder, B b, C c )
48 {
49 this.recorder = recorder;
50 }
51
52 @WarmUp
53 public void warmUp()
54 throws InterruptedException
55 {
56 recorder.record( "A" );
57 }
58 }
59
60 @Singleton
61 @SuppressWarnings( "UnusedParameters" )
62 public static class B
63 {
64 private final Recorder recorder;
65
66 @Inject
67 public B( Recorder recorder, D d )
68 {
69 this.recorder = recorder;
70 }
71
72 @WarmUp
73 public void warmUp()
74 throws InterruptedException
75 {
76 recorder.record( "B" );
77 }
78 }
79
80 @Singleton
81 @SuppressWarnings( "UnusedParameters" )
82 public static class C
83 {
84 private final Recorder recorder;
85
86 @Inject
87 public C( Recorder recorder, E e )
88 {
89 this.recorder = recorder;
90 }
91
92 @WarmUp
93 public void warmUp()
94 throws InterruptedException
95 {
96 recorder.record( "C" );
97 }
98 }
99
100 @Singleton
101 @SuppressWarnings( "UnusedParameters" )
102 public static class D
103 {
104 private final Recorder recorder;
105
106 @Inject
107 public D( Recorder recorder, E e, F f )
108 {
109 this.recorder = recorder;
110 }
111
112 @WarmUp
113 public void warmUp()
114 throws InterruptedException
115 {
116 recorder.record( "D" );
117 }
118 }
119
120 @Singleton
121 public static class E
122 {
123 private final Recorder recorder;
124
125 @Inject
126 public E( Recorder recorder )
127 {
128 this.recorder = recorder;
129 }
130
131 @WarmUp
132 public void warmUp()
133 throws InterruptedException
134 {
135 recorder.record( "E" );
136 }
137 }
138
139 @Singleton
140 public static class F
141 {
142 private final Recorder recorder;
143
144 @Inject
145 public F( Recorder recorder )
146 {
147 this.recorder = recorder;
148 }
149
150 @WarmUp
151 public void warmUp()
152 throws InterruptedException
153 {
154 recorder.record( "F" );
155 }
156 }
157 }