Package org.aspectj.apache.bcel.util.ClassLoaderRepository.SoftHashMap

Examples of org.aspectj.apache.bcel.util.ClassLoaderRepository.SoftHashMap.SpecialValue


        this.key = k;
      }
    }

    private void processQueue() {
      SpecialValue sv = null;
      while ((sv = (SpecialValue) rq.poll()) != null) {
        map.remove(sv.key);
      }
    }
View Full Code Here


      }
    }

    @Override
    public Object get(Object key) {
      SpecialValue value = map.get(key);
      if (value == null)
        return null;
      if (value.get() == null) {
        // it got GC'd
        map.remove(value.key);
        if (recordMiss)
          missSharedEvicted++;
        return null;
      } else {
        return value.get();
      }
    }
View Full Code Here

    }

    @Override
    public Object put(Object k, Object v) {
      processQueue();
      return map.put(k, new SpecialValue(k, v));
    }
View Full Code Here

    }

    @Override
    public Object remove(Object k) {
      processQueue();
      SpecialValue value = map.remove(k);
      if (value == null)
        return null;
      if (value.get() != null) {
        return value.get();
      }
      return null;
    }
View Full Code Here

TOP

Related Classes of org.aspectj.apache.bcel.util.ClassLoaderRepository.SoftHashMap.SpecialValue

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.