Package java.lang.ref

Examples of java.lang.ref.ReferenceQueue$Null


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


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

            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

  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

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

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

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

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

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

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

  }

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

    }

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

     * Clears the table.
     */
    public void clear() {
        table = new Entry[INITIAL_CAPACITY];
        count = 0;
        referenceQueue = new ReferenceQueue();
    }
View Full Code Here

TOP

Related Classes of java.lang.ref.ReferenceQueue$Null

Copyright © 2018 www.massapicom. 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.