Package com.sun.jini.collection

Examples of com.sun.jini.collection.WeakIdentityMap$Key


    validateQuery(query);
    validateSplitSize(numSplits);

    List<Query> splits = new ArrayList<Query>(numSplits);
    List<Key> scatterKeys = getScatterKeys(numSplits, query, datastore);
    Key lastKey = null;
    for (Key nextKey : getSplitKey(scatterKeys, numSplits)) {
      splits.add(createSplit(lastKey, nextKey, query));
      lastKey = nextKey;
    }
    splits.add(createSplit(lastKey, null, query));
View Full Code Here


     * method with the same name and parameter types as m that does not
     * declare RemoteException or a superclass in its throws clause, or if
     * any superinterface of c has its name in prohibitedProxyInterfaces.
     */
    public static void checkProxyRemoteMethod(Class c, Method m) {
  WeakIdentityMap map;
  synchronized (proxyRemoteMethodCache) {
      SoftReference ref = (SoftReference) proxyRemoteMethodCache.get(c);
      map = (ref == null) ? null : (WeakIdentityMap) ref.get();
      if (map == null && ref != null) {
    map = new WeakIdentityMap();
    proxyRemoteMethodCache.put(c, new SoftReference(map));
      }
  }
  if (map == null) {
      checkProhibitedProxyInterfaces(c);
      synchronized (proxyRemoteMethodCache) {
    SoftReference ref =
        (SoftReference) proxyRemoteMethodCache.get(c);
    map = (ref == null) ? null : (WeakIdentityMap) ref.get();
    if (map == null) {
        map = new WeakIdentityMap();
        proxyRemoteMethodCache.put(c, new SoftReference(map));
    }
      }
  }
  synchronized (map) {
      if (map.get(m) != null) {
    return;
      }
  }
  checkExceptions(c, m.getName(), m.getParameterTypes());
  synchronized (map) {
      map.put(m, Boolean.TRUE);
  }
    }
View Full Code Here

     * method with the same name and parameter types as m that does not
     * declare RemoteException or a superclass in its throws clause, or if
     * any superinterface of c has its name in prohibitedProxyInterfaces.
     */
    public static void checkProxyRemoteMethod(Class c, Method m) {
  WeakIdentityMap map;
  synchronized (proxyRemoteMethodCache) {
      SoftReference ref = (SoftReference) proxyRemoteMethodCache.get(c);
      map = (ref == null) ? null : (WeakIdentityMap) ref.get();
      if (map == null && ref != null) {
    map = new WeakIdentityMap();
    proxyRemoteMethodCache.put(c, new SoftReference(map));
      }
  }
  if (map == null) {
      checkProhibitedProxyInterfaces(c);
      synchronized (proxyRemoteMethodCache) {
    SoftReference ref =
        (SoftReference) proxyRemoteMethodCache.get(c);
    map = (ref == null) ? null : (WeakIdentityMap) ref.get();
    if (map == null) {
        map = new WeakIdentityMap();
        proxyRemoteMethodCache.put(c, new SoftReference(map));
    }
      }
  }
  synchronized (map) {
      if (map.get(m) != null) {
    return;
      }
  }
  checkExceptions(c, m.getName(), m.getParameterTypes());
  synchronized (map) {
      map.put(m, Boolean.TRUE);
  }
    }
View Full Code Here

TOP

Related Classes of com.sun.jini.collection.WeakIdentityMap$Key

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.