Package java.lang.ref

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


                // 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

                // 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

                 */
                if (!enqueueNow) {
                    Object i = get();
                    if (i != null) {
                        WeakReference sClear = new WeakReference(i, refQueue);
                        sClear.enqueue();
                    }
                }
                super.clear();
            }
        };
View Full Code Here

                // 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

                // 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

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.