Examples of enqueue()


Examples of java.lang.ref.SoftReference.enqueue()

  public void test_enqueue() {
    ReferenceQueue rq = new ReferenceQueue();
    obj = new Object();
    Reference ref = new SoftReference(obj, rq);
    assertTrue("Enqueue failed.", (!ref.isEnqueued())
        && ((ref.enqueue()) && (ref.isEnqueued())));
    assertTrue("Not properly enqueued.", rq.poll().get() == obj);
    // This fails...
    assertTrue("Should remain enqueued.", !ref.isEnqueued());
    assertTrue("Can not enqueue twice.", (!ref.enqueue())
        && (rq.poll() == null));
View Full Code Here

Examples of java.lang.ref.WeakReference.enqueue()

   * when they are created. Needed for dynamic Look And Feel
   * changes
   */
  public static void register(Widget widget) {
    WeakReference reference = new WeakReference(widget);
    reference.enqueue();
    synchronized (widgets) {
      widgets.add(reference);
    }
    System.gc();
  }
View Full Code Here

Examples of java.lang.ref.WeakReference.enqueue()

                // collected
                for (Iterator iter = referenceToHostConfig.keySet().iterator(); iter.hasNext();) {
                    WeakReference connectionRef = (WeakReference) iter.next();
                    if (connectionRef.get() == connection) {
                        iter.remove();
                        connectionRef.enqueue();
                        break;
                    }
                }
               
                HostConnectionPool hostPool = getHostPool(connectionConfiguration);
View Full Code Here

Examples of net.greghaines.jesque.client.Client.enqueue()

    public static void enqueueJobs(final String queue, final List<Job> jobs, final Config config) {
        final Client client = new ClientImpl(config);
        try {
            for (final Job job : jobs) {
                client.enqueue(queue, job);
            }
        } finally {
            client.end();
        }
    }
View Full Code Here

Examples of net.greghaines.jesque.client.ClientImpl.enqueue()

    public static void enqueueJobs(final String queue, final List<Job> jobs, final Config config) {
        final Client client = new ClientImpl(config);
        try {
            for (final Job job : jobs) {
                client.enqueue(queue, job);
            }
        } finally {
            client.end();
        }
    }
View Full Code Here

Examples of net.sf.jiga.xtended.kernel.SpritesCacheManager.SoftValue.enqueue()

                public void clear() {
                        if (enqueueClear) {
                                Object o = get();
                                if (o != null) {
                                        SoftValue sClear = new SoftValue(o, key, false);
                                        sClear.enqueue();
                                }
                        }
                        super.clear();
                }
        }
View Full Code Here

Examples of net.sourceforge.fullsync.impl.FillBufferTaskExecutor.enqueue()

        if (listener != null) {
          queue.addTaskFinishedListener(listener);
        }

        buffer.load();
        queue.enqueue(taskTree);
        queue.flush();
        buffer.unload();

        taskTree.getSource().flush();
        taskTree.getDestination().flush();
View Full Code Here

Examples of net.zschech.gwt.comet.server.CometSession.enqueue()

            cometResponse.terminate();
          }
          else {
            for (int i = 0; i < count; i++) {
              for (int b = 0; b < batch; b++) {
                cometSession.enqueue(getMessage(string, order, i * batch + b));
              }
             
              if (delay > 0) {
                try {
                  sleep(delay);
View Full Code Here

Examples of org.apache.ambari.server.agent.ActionQueue.enqueue()

    hostObject.setState(HostState.UNHEALTHY);

    ExecutionCommand execCmd = new ExecutionCommand();
    execCmd.setCommandId("2-34");
    execCmd.setHostname(DummyHostname1);
    aq.enqueue(DummyHostname1, new ExecutionCommand());
    HeartBeat hb = new HeartBeat();
    hb.setResponseId(0);
    hb.setNodeStatus(new HostStatus(Status.HEALTHY, DummyHostStatus));
    hb.setHostname(DummyHostname1);
View Full Code Here

Examples of org.apache.bcel.util.ClassQueue.enqueue()

     * Get all interfaces implemented by this JavaClass (transitively).
     */
    public JavaClass[] getAllInterfaces() throws ClassNotFoundException {
        ClassQueue queue = new ClassQueue();
        Set allInterfaces = new TreeSet();
        queue.enqueue(this);
        while (!queue.empty()) {
            JavaClass clazz = queue.dequeue();
            JavaClass souper = clazz.getSuperClass();
            JavaClass[] _interfaces = clazz.getInterfaces();
            if (clazz.isInterface()) {
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.