APISonar


java.util.ArrayList.notify

> java > util > ArrayList > notify
java APIs util APIs ArrayList APIs notify APIs

Example 1
protected ArrayList	     list;

    public void returnObject(Object object) {
    	synchronized (list) {
            list.add(object);
            poolReturned++; 
            if (waitCount > 0) {
                list.notify();
            }
    	}
    }
Example 2
private ArrayList<Runnable> jobList = new ArrayList<Runnable>(0);

    public void submitTask(Runnable task) throws IllegalArgumentException {
        stateCheck();

        if (task == null) {
            throw new IllegalArgumentException("No task specified.");
        }

        synchronized(jobList) {
            jobList.add(jobList.size(), task);

            jobList.notify();
        }

        createThread();
    }
Example 3
protected ArrayList	     list;

    public void destroyObject(Object object) {
    	synchronized (list) {
            poolProbeNotifier.ejbObjectDestroyedEvent();
            destroyedCount++;
            if (waitCount > 0) {
                list.notify();
            }
    	}
        try {
            factory.destroy(object);
        } catch (Exception ex) {
            _logger.log(Level.FINE, "Exception in destroyObject()", ex);
        }
    }
Example 4
static final ArrayList<BatteryEntry> mRequestQueue = new ArrayList<BatteryEntry>();

    public static void startRequestQueue() {
        if (sHandler != null) {
            synchronized (mRequestQueue) {
                if (!mRequestQueue.isEmpty()) {
                    if (mRequestThread != null) {
                        mRequestThread.abort();
                    }
                    mRequestThread = new NameAndIconLoader();
                    mRequestThread.setPriority(Thread.MIN_PRIORITY);
                    mRequestThread.start();
                    mRequestQueue.notify();
                }
            }
        }
    }
Example 5
private final ArrayList<Record> localityRecords = new ArrayList<Record>();

  public void record(
    TaskInProgress tip, String host, long inputBytes) {
    synchronized (localityRecords) {
      localityRecords.add(new Record(tip, host, inputBytes));
      localityRecords.notify();
    }
  }