2323
2424import org .tinystruct .AbstractApplication ;
2525import org .tinystruct .ApplicationException ;
26- import org .tinystruct .ApplicationRuntimeException ;
2726import org .tinystruct .data .component .Builder ;
2827import org .tinystruct .system .ApplicationManager ;
2928
@@ -35,9 +34,8 @@ public class talk extends AbstractApplication {
3534 protected final Map <String , Queue <Builder >> list = new ConcurrentHashMap <String , Queue <Builder >>();
3635 protected final Map <String , List <String >> sessions = new ConcurrentHashMap <String , List <String >>();
3736 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 ();
4139
4240 @ Override
4341 public void init () {
@@ -146,7 +144,6 @@ public final String update(final String sessionId) throws ApplicationException,
146144 throw new ApplicationException (e .getMessage (), e );
147145 }
148146 }
149- producer .signalAll ();
150147 lock .unlock ();
151148 return message .toString ();
152149 }
@@ -176,11 +173,6 @@ private final void copy(Object meetingCode, Builder builder) {
176173 Entry <String , Queue <Builder >> list = iterator .next ();
177174 if (_sessions .contains (list .getKey ())) {
178175 lock .lock ();
179- try {
180- producer .await ();
181- } catch (InterruptedException e ) {
182- throw new ApplicationRuntimeException (e .getMessage (), e );
183- }
184176 list .getValue ().add (builder );
185177 consumer .signalAll ();
186178 lock .unlock ();
0 commit comments