Package java.util.concurrent.atomic

Examples of java.util.concurrent.atomic.AtomicBoolean.notify()


        if (Boolean.TRUE.equals(state)) {
          StepSynchronizationManager.close();
        }
        done.set(true);
        synchronized (done) {
          done.notify();
        }
      }

      @Override
      public void jobKilled(Job job) {
View Full Code Here


        connection.addNotificationListener(monitorName, new NotificationListener() {
            public void handleNotification(Notification notification, Object handback) {
                System.out.println("Notification = " + notification);
                synchronized (notificationSet) {
                    notificationSet.set(true);
                    notificationSet.notify();
                }
            }
        }, null, null);
        service.start();
        monitorMBean.start();
View Full Code Here

                            assertTrue(b[i] == testData);
                        }
                    }
                    complete.set(true);
                    synchronized (complete) {
                        complete.notify();
                    }
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
View Full Code Here

        IJobChangeListener listener = new JobChangeAdapter() {
            @Override
            public void done(IJobChangeEvent event) {
                done.set(true);
                synchronized (done) {
                    done.notify();
                }

            }
        };
        renderJob.addJobChangeListener(listener);
View Full Code Here

                            assertTrue(b[i] == testData);
                        }
                    }
                    complete.set(true);
                    synchronized (complete) {
                        complete.notify();
                    }
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
View Full Code Here

        yield(); // if locking doesn't work, t2 will set the fields first
        field1.set(1);
        field2.set(1);
        synchronized (t1Done) {
          t1Done.set(true);
          t1Done.notify();
        }
      }
    };

    // thread 2: wait for t1 to acquire the lock, get a lock, set fields to 2
View Full Code Here

      tableDisplay.addKeyHook(new Runnable() {
        @Override
        public void run() {
          synchronized (viewing) {
            viewing.set(false);
            viewing.notify();
            tableDisplay.setStopReadingInput(true);
          }
        }
      }, 'q');
View Full Code Here

                in.setHeader("cheese", 123);
            }
        }, new AsyncCallback() {
            public void done(boolean b) {
                bool.set(true);
                bool.notify();
            }
        });
        return bool;
    }
View Full Code Here

               
                try {
                    final AtomicBoolean workerLock = lockFuture.get();
                    synchronized (workerLock) {
                        workerLock.set(false);
                        workerLock.notify();
                    }
                } catch (BabuDBException be) {
                    Logging.logMessage(Logging.LEVEL_DEBUG, this, "The worker lock could not have" +
                        " been acquired for unlock.");
                }
View Full Code Here

                            assertTrue(b[i] == testData);
                        }
                    }
                    complete.set(true);
                    synchronized (complete) {
                        complete.notify();
                    }
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.