Examples of CacheKey


Examples of org.apache.ibatis.cache.CacheKey

      if (nestedResultMapId != null) {
        try {
          final ResultMap nestedResultMap = getNestedResultMap(rs, nestedResultMapId);
          final Object collectionProperty = instantiateCollectionPropertyIfAppropriate(resultMapping, metaObject);

          final CacheKey parentRowKey = createRowKey(resultMap, rs);
          final CacheKey rowKey = createRowKey(nestedResultMap, rs);
          final Set<CacheKey> localRowValueCache = getRowValueCache(parentRowKey);
          final boolean knownValue = localRowValueCache.contains(rowKey);
          localRowValueCache.add(rowKey);
          Object rowValue = getRowValue(rs, nestedResultMap, rowKey);
View Full Code Here

Examples of org.apache.ibatis.cache.CacheKey

  //
  // UNIQUE RESULT KEY
  //

  private CacheKey createRowKey(ResultMap resultMap, ResultSet rs) throws SQLException {
    final CacheKey cacheKey = new CacheKey();
    List<ResultMapping> resultMappings = getResultMappingsForRowKey(resultMap);
    cacheKey.update(resultMap.getId());
    if (resultMappings.size() == 0) {
      if (Map.class.isAssignableFrom(resultMap.getType())) {
        createRowKeyForMap(rs, cacheKey);
      } else {
        createRowKeyForUnmappedProperties(resultMap, rs, cacheKey);
      }
    } else {
      createRowKeyForMappedProperties(rs, cacheKey, resultMappings);
    }
    if (cacheKey.getUpdateCount() < 2) {
      return CacheKey.NULL_CACHE_KEY;
    }
    return cacheKey;
  }
View Full Code Here

Examples of org.apache.maven.project.artifact.DefaultMavenMetadataCache.CacheKey

        // sanity checks
        assertNotSame( a1, a2 );
        assertNotSame( lr1, lr2 );
        assertNotSame( rr1, rr2 );

        CacheKey k1 = new CacheKey( a1, false, lr1, Collections.singletonList( rr1 ) );
        CacheKey k2 = new CacheKey( a2, false, lr2, Collections.singletonList( rr2 ) );
       
        assertEquals(k1.hashCode(), k2.hashCode());
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.identitymaps.CacheKey

                            if (null == value) {
                                XMLField pkField = (XMLField) xmlDescriptor.getPrimaryKeyFields().get(x);
                                ((CacheId)pk).set(x, getUnmarshaller().getXMLContext().getValueByXPath(currentObject, pkField.getXPath(), pkField.getNamespaceResolver(), Object.class));
                            }
                        }
                        CacheKey key = session.getIdentityMapAccessorInstance().acquireDeferredLock(pk, xmlDescriptor.getJavaClass(), xmlDescriptor);
                        key.setRecord(this);
                        key.setObject(currentObject);
                        key.releaseDeferredLock();
                    }
                }
            }
        }
View Full Code Here

Examples of org.exoplatform.services.jcr.infinispan.CacheKey

         // check all ITEMS in cache
         Iterator<CacheKey> keys = cache.keySet().iterator();

         while (keys.hasNext())
         {
            CacheKey key = keys.next();
            if (key instanceof CacheId)
            {
               ItemData data = (ItemData)cache.get(key);
               ISPNCacheWorkspaceStorageCache.updateTreePath(cache, getOwnerId(), data, prevRootPath, newRootPath, acl);
            }
View Full Code Here

Examples of org.fusesource.restygwt.client.cache.CacheKey

        return "org.fusesource.restygwt.VolatileQueueableCacheStorageTestGwt";
    }
   
    public void testTimeout() throws Exception{
        final VolatileQueueableCacheStorage storage = new VolatileQueueableCacheStorage(100);
        final CacheKey key = new SimpleCacheKey("first");
        Response resp = new ResponseMock();

        storage.putResult(key, resp);
        // hashCode should be good enough
        assertEquals(resp.hashCode(), storage.getResultOrReturnNull(key).hashCode());
View Full Code Here

Examples of org.g4studio.core.orm.xibatis.sqlmap.engine.cache.CacheKey

    return n;
  }

  public Object executeQueryForObject(StatementScope statementScope, Transaction trans, Object parameterObject,
      Object resultObject) throws SQLException {
    CacheKey cacheKey = getCacheKey(statementScope, parameterObject);
    cacheKey.update("executeQueryForObject");
    Object object = cacheModel.getObject(cacheKey);
    if (object == CacheModel.NULL_OBJECT) {
      // This was cached, but null
      object = null;
    } else if (object == null) {
View Full Code Here

Examples of org.hibernate.cache.CacheKey

    else {
      version = null;
    }

    CollectionCacheEntry entry = new CollectionCacheEntry( lce.getCollection(), persister );
    CacheKey cacheKey = new CacheKey(
        lce.getKey(),
        persister.getKeyType(),
        persister.getRole(),
        session.getEntityMode(),
        session.getFactory()
View Full Code Here

Examples of org.hibernate.cache.CacheKey

          entityEntry.isLoadedWithLazyPropertiesUnfetched(),
          version,
          session,
          entity
      );
      CacheKey cacheKey = new CacheKey(
          id,
          persister.getIdentifierType(),
          persister.getRootEntityName(),
          session.getEntityMode(),
          session.getFactory()
View Full Code Here

Examples of org.hibernate.cache.CacheKey

    }
    else {
     
      final SessionFactoryImplementor factory = source.getFactory();

      final CacheKey ck = new CacheKey(
          id,
          persister.getKeyType(),
          persister.getRole(),
          source.getEntityMode(),
          source.getFactory()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.