Package java.lang.ref

Examples of java.lang.ref.ReferenceQueue


     */
    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        in.defaultReadObject();
        table = new Entry[in.readInt()];
        threshold = (int)(table.length * loadFactor);
        queue = new ReferenceQueue();
        Object key = in.readObject();
        while (key != null) {
            Object value = in.readObject();
            put(key, value);
            key = in.readObject();
View Full Code Here


    }

    final ReferenceQueue refQueue()
    {
        if (_refQueue == null)
            _refQueue = new ReferenceQueue();

        return _refQueue;
    }
View Full Code Here

    public MultiThreadedHttpConnectionManager() {

        this.referenceToHostConfig = Collections.synchronizedMap(new HashMap());
        this.connectionPool = new ConnectionPool();
       
        this.referenceQueue = new ReferenceQueue();

        new ReferenceQueueThread().start();

    }
View Full Code Here

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

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

  private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException
  {
    s.defaultReadObject();

    int size = s.readInt();
    queue = new ReferenceQueue();
    directComponentRefs = new IntHashMap((int)(size * 1.25));

    while (--size >= 0)
    {
      int uid = s.readInt();
View Full Code Here

     * @param loadFactor  loadfactor for map
     */
    public ReplicationSessionMonitors(Logger logger, int size, float loadFactor) {
        _logger = logger;
        replicatedSessionMonitors = new ConcurrentHashMap(size, loadFactor, CONCURRENCY_LEVEL);
        replicatedSessionMonitorsRefQueue = new ReferenceQueue();
    }
View Full Code Here

     */
    private void readObject(ObjectInputStream inp) throws IOException, ClassNotFoundException {
        inp.defaultReadObject();
        table = new Entry[inp.readInt()];
        threshold = (int)(table.length * loadFactor);
        queue = new ReferenceQueue();
        Object key = inp.readObject();
        while (key != null) {
            Object value = inp.readObject();
            put(key, value);
            key = inp.readObject();
View Full Code Here

        fTableSize = initialCapacity;
        fBuckets = new SREntry[fTableSize];
        fThreshold = (int)(fTableSize * loadFactor);
        fCount = 0;

        fReferenceQueue = new ReferenceQueue();
    }
View Full Code Here

                                                     whatToShow,
                                                     filter,
                                                     entityReferenceExpansion);
        if (iterators == null) {
            iterators = new LinkedList();
            iteratorReferenceQueue = new ReferenceQueue();
        }

        removeStaleIteratorReferences();
        iterators.add(new WeakReference(iterator, iteratorReferenceQueue));
View Full Code Here

TOP

Related Classes of java.lang.ref.ReferenceQueue

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.