Examples of ReferenceQueue


Examples of java.lang.ref.ReferenceQueue

  public WeakCache(Cache delegate) {
    this.delegate = delegate;
    this.numberOfHardLinks = 256;
    this.hardLinksToAvoidGarbageCollection = new LinkedList();
    this.queueOfGarbageCollectedEntries = new ReferenceQueue();
  }
View Full Code Here

Examples of java.lang.ref.ReferenceQueue

  public SoftCache(Cache delegate) {
    this.delegate = delegate;
    this.numberOfHardLinks = 256;
    this.hardLinksToAvoidGarbageCollection = new LinkedList();
    this.queueOfGarbageCollectedEntries = new ReferenceQueue();
  }
View Full Code Here

Examples of java.lang.ref.ReferenceQueue

            return;
        }
       
        // many thanks to Juozas Baliuka for suggesting this methodology
        TestClassLoader loader = new TestClassLoader();
        ReferenceQueue queue = new ReferenceQueue();
        WeakReference loaderReference = new WeakReference(loader, queue);
        Integer test = new Integer(1);
       
        WeakReference testReference = new WeakReference(test, queue);
        //Map map = new ReferenceMap(ReferenceMap.WEAK, ReferenceMap.HARD, true);
View Full Code Here

Examples of java.lang.ref.ReferenceQueue

  private final Map<K, SoftValue<K,V>> internalMap =
    new HashMap<K, SoftValue<K,V>>();
  private final ReferenceQueue<?> rq;

  public SoftValueMap() {
    this(new ReferenceQueue());
  }
View Full Code Here

Examples of java.lang.ref.ReferenceQueue

   */
  public ImageCache() {
    imageMap = Collections.synchronizedMap(new HashMap());

    staleImages = new StaleImages();
    imageReferenceQueue = new ReferenceQueue();
    imageCleaner = new ReferenceCleanerThread(this);
    imageCleaner.start();
  }
View Full Code Here

Examples of java.lang.ref.ReferenceQueue

      imageMap = Collections.synchronizedMap(new HashMap(
          initialLoadCapacity));
    }

    staleImages = new StaleImages();
    imageReferenceQueue = new ReferenceQueue();
    imageCleaner = new ReferenceCleanerThread(this);
    imageCleaner.start();
  }
View Full Code Here

Examples of java.lang.ref.ReferenceQueue

      imageMap = Collections.synchronizedMap(new HashMap(
          initialLoadCapacity, loadFactor));
    }

    staleImages = new StaleImages();
    imageReferenceQueue = new ReferenceQueue();
    imageCleaner = new ReferenceCleanerThread(this);
    imageCleaner.start();
  }
View Full Code Here

Examples of java.lang.ref.ReferenceQueue

  }

  // Constructs a new <code>IdManager</code>
  private VMIdManager ()
  {
    _refQueue = new ReferenceQueue ();
    _oidTable = new Hashtable (50);
    _idTable = new Hashtable (50);
    _classTable = new Hashtable (20);
    _ridTable = new Hashtable (20);
  }
View Full Code Here

Examples of java.lang.ref.ReferenceQueue

    }

    private void initTransientFields() {
        cache     = new WeakHashMap();
        fontCache = new HashMap();
        queue     = new ReferenceQueue();
        attrSet   = new SimpleAttributeSet();
        styles    = new NamedStyle();
    }
View Full Code Here

Examples of java.lang.ref.ReferenceQueue

     * Clears the table.
     */
    public void clear() {
        table = new Entry[INITIAL_CAPACITY];
        count = 0;
        referenceQueue = new ReferenceQueue();
    }
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.