Package java.util

Examples of java.util.WeakHashMap$WeakBucket$WeakEntry


        synchronized (m_cache)
        {
            index = (Map) m_cache.get(conditions);
            if (index == null)
            {
                index = new WeakHashMap();
                m_cache.put(conditions, index);
            }
        }
        synchronized (index)
        {
View Full Code Here


   * Mapping of a Node to its User Data table (represented by a Map)
   */
  private Map fData;

  private UserData() {
    fData = new WeakHashMap(0);
  }
View Full Code Here

  }
 
  private SpanFilterResult getCachedResult(IndexReader reader) throws IOException {
    SpanFilterResult result = null;
    if (cache == null) {
      cache = new WeakHashMap();
    }

    synchronized (cache) {  // check cache
      result = (SpanFilterResult) cache.get(reader);
      if (result == null) {
View Full Code Here

  /**
   * @deprecated Use {@link #getDocIdSet(IndexReader)} instead.
   */
  public BitSet bits(IndexReader reader) throws IOException {
    if (cache == null) {
      cache = new WeakHashMap();
    }

    Object cached = null;
    synchronized (cache) {  // check cache
      cached = cache.get(reader);
View Full Code Here

    }
  }
 
  public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
    if (cache == null) {
      cache = new WeakHashMap();
    }

    Object cached = null;
    synchronized (cache) {  // check cache
      cached = cache.get(reader);
View Full Code Here

    this.shouldHaveCache = shouldHaveCache;
  }
 
  public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
    if (cache == null) {
      cache = new WeakHashMap();
    }
   
    synchronized (cache) {  // check cache
      DocIdSet cached = (DocIdSet) cache.get(reader);
      if (shouldHaveCache) {
View Full Code Here

        // If so, retrieve the node number
        // If not, assign a number to the node
        // Node numbers are negative, from -1 to -n
        int num;
        if (nodeTable == null) {
            nodeTable = new WeakHashMap();
            num = --nodeCounter;
            nodeTable.put(node, new Integer(num));
        }
        else {
            Integer n = (Integer)nodeTable.get(node);
View Full Code Here

            return null;
        }
        else {
            Hashtable t;
            if (userData == null) {
                userData = new WeakHashMap();
                t = new Hashtable();
                userData.put(n, t);
            }
            else {
                t = (Hashtable) userData.get(n);
View Full Code Here

     * @param n The node this operation applies to.
     * @param data The user data table.
     */
    void setUserDataTable(Node n, Hashtable data) {
        if (userData == null) {
            userData = new WeakHashMap();
        }
        if (data != null) {
            userData.put(n, data);
        }
    }
View Full Code Here

     */
    private void readObject(ObjectInputStream in)
        throws IOException, ClassNotFoundException {
        in.defaultReadObject();
        if (userData != null) {
            userData = new WeakHashMap(userData);
        }
        if (nodeTable != null) {
            nodeTable = new WeakHashMap(nodeTable);
        }
    }
View Full Code Here

TOP

Related Classes of java.util.WeakHashMap$WeakBucket$WeakEntry

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.