23
23
24
24
import org .tinystruct .AbstractApplication ;
25
25
import org .tinystruct .ApplicationException ;
26
- import org .tinystruct .ApplicationRuntimeException ;
27
26
import org .tinystruct .data .component .Builder ;
28
27
import org .tinystruct .system .ApplicationManager ;
29
28
@@ -35,9 +34,8 @@ public class talk extends AbstractApplication {
35
34
protected final Map <String , Queue <Builder >> list = new ConcurrentHashMap <String , Queue <Builder >>();
36
35
protected final Map <String , List <String >> sessions = new ConcurrentHashMap <String , List <String >>();
37
36
private ExecutorService service ;
38
- private Lock lock = new ReentrantLock ();
39
- private Condition consumer = lock .newCondition ();
40
- private Condition producer = lock .newCondition ();
37
+ private final Lock lock = new ReentrantLock ();
38
+ private final Condition consumer = lock .newCondition ();
41
39
42
40
@ Override
43
41
public void init () {
@@ -146,7 +144,6 @@ public final String update(final String sessionId) throws ApplicationException,
146
144
throw new ApplicationException (e .getMessage (), e );
147
145
}
148
146
}
149
- producer .signalAll ();
150
147
lock .unlock ();
151
148
return message .toString ();
152
149
}
@@ -176,11 +173,6 @@ private final void copy(Object meetingCode, Builder builder) {
176
173
Entry <String , Queue <Builder >> list = iterator .next ();
177
174
if (_sessions .contains (list .getKey ())) {
178
175
lock .lock ();
179
- try {
180
- producer .await ();
181
- } catch (InterruptedException e ) {
182
- throw new ApplicationRuntimeException (e .getMessage (), e );
183
- }
184
176
list .getValue ().add (builder );
185
177
consumer .signalAll ();
186
178
lock .unlock ();
0 commit comments