Package java.util

Examples of java.util.WeakHashMap$Entry


    static synchronized private Long findHash(Class clazz,
                boolean marshaling)
  throws MarshalException, UnusableEntryException
    {
  if (classHashes == null)
      classHashes = new WeakHashMap();

  Long hash = (Long)classHashes.get(clazz);

  // If hash not cached, calculate it for this class and,
  // recursively, all superclasses
View Full Code Here


 
  limit = Math.min(limit, takeLimit);
  EntryHandle[] handles = new EntryHandle[limit];
  int found = 0;
  final Set conflictSet = new java.util.HashSet();
  final WeakHashMap provisionallyRemovedEntrySet = new WeakHashMap();

  for (Iterator i=classes.iterator();
       i.hasNext() && found < handles.length;)
        {
      final String clazz = (String)i.next();
View Full Code Here

  EntryHandle handle = null;
  final Set conflictSet = new java.util.HashSet();
  final Set lockedEntrySet =
      (ifExists?new java.util.HashSet():null);
  final WeakHashMap provisionallyRemovedEntrySet =
      new java.util.WeakHashMap();

  /*
   * First we do the straight search
   */
 
View Full Code Here

      mustQuery = true;
  } else {
      if (logger.isLoggable(Level.FINEST))
    logger.log(Level.FINEST, "adding resource to task -- LONG");
      if (queries == null)
    queries = new WeakHashMap();// we use it like a WeakHashSet
      queries.put(query, null);
  }
    }
View Full Code Here

        The value for all entries of {@link #localClients}
    */
    protected final static Object   value   =   new Object();

    public LocalClientTracker() {
        localClients    =   new WeakHashMap();
    }
View Full Code Here

            fontCache.remove(r.getKey());
        }
    }

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

    this.filter = filter;
  }

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

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

  }

  public BitSet bits(IndexReader reader) throws IOException {

    if (cache == null) {
      cache = new WeakHashMap();
    }

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

        /**
         * Sets the tool tip on the input element.
         */
        public void setToolTip(Element elt, String toolTip){
            if (toolTipMap == null) {
                toolTipMap = new WeakHashMap();
            }

            toolTipMap.put(elt, toolTip);

            if (elt == lastTarget)
View Full Code Here

     * @param element the element to bind to the specified graphics node
     * @param node the graphics node to bind to the specified element
     */
    public void bind(Element element, GraphicsNode node) {
        if (elementNodeMap == null) {
            elementNodeMap = new WeakHashMap();
            nodeElementMap = new WeakHashMap();
        }
        elementNodeMap.put(element, new SoftReference(node));
        nodeElementMap.put(node, new SoftReference(element));
    }
View Full Code Here

TOP

Related Classes of java.util.WeakHashMap$Entry

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.