Examples of WeakObject


Examples of org.jboss.util.WeakObject

            /** The next available object. */
            Object next = null;

            public boolean hasNext() {
               while (iter.hasNext()) {
                  WeakObject weak = (WeakObject)iter.next();
                  Object obj = null;
                  if (weak != null && (obj = weak.get()) == null) {
                     // object has been reclaimed by the GC
                     continue;
                  }

                  next = obj;
View Full Code Here

Examples of org.jboss.util.WeakObject

   /**
    * Maintain the elements in the set.  Removes objects from the set that
    * have been reclaimed due to GC.
    */
   protected final void maintain() {
      WeakObject weak;
      while ((weak = (WeakObject)queue.poll()) != null) {
         set.remove(weak);
      }
   }
View Full Code Here

Examples of org.jboss.util.WeakObject

            public boolean hasNext() {
               if (next != UNKNOWN) {
                  return true;
               }
               while (iter.hasNext()) {
                  WeakObject weak = (WeakObject)iter.next();
                  Object obj = null;
                  if (weak != null && (obj = weak.get()) == null) {
                     // object has been reclaimed by the GC
                     continue;
                  }
                  next = obj;
                  return true;
View Full Code Here

Examples of org.jboss.util.WeakObject

/*  83 */     this(new HashSet());
/*     */   }
/*     */
/*     */   protected final void maintain()
/*     */   {
/*     */     WeakObject weak;
/*  92 */     while ((weak = (WeakObject)this.queue.poll()) != null)
/*  93 */       this.set.remove(weak);
/*     */   }
View Full Code Here

Examples of org.jboss.util.WeakObject

/*     */       public boolean hasNext() {
/* 126 */         if (this.next != this.UNKNOWN) {
/* 127 */           return true;
/*     */         }
/* 129 */         while (this.iter.hasNext()) {
/* 130 */           WeakObject weak = (WeakObject)this.iter.next();
/* 131 */           Object obj = null;
/* 132 */           if ((weak != null) && ((obj = weak.get()) == null))
/*     */           {
/*     */             continue;
/*     */           }
/* 136 */           this.next = obj;
/* 137 */           return true;
View Full Code Here

Examples of org.jboss.util.WeakObject

   /**
    * Maintain the elements in the set.  Removes objects from the set that
    * have been reclaimed due to GC.
    */
   protected final void maintain() {
      WeakObject weak;
      while ((weak = (WeakObject)queue.poll()) != null) {
         set.remove(weak);
      }
   }
View Full Code Here

Examples of org.jboss.util.WeakObject

            /** The next available object. */
            Object next = null;

            public boolean hasNext() {
               while (iter.hasNext()) {
                  WeakObject weak = (WeakObject)iter.next();
                  Object obj = null;
                  if (weak != null && (obj = weak.get()) == null) {
                     // object has been reclaimed by the GC
                     continue;
                  }

                  next = obj;
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.