Examples of CacheKey


Examples of bitronix.tm.resource.jdbc.LruStatementCache.CacheKey

    public PreparedStatement prepareStatement(String sql) throws SQLException {
        enlistResource();

        if (useStatementCache) {
            CacheKey cacheKey = new CacheKey(sql);
            PreparedStatement cachedStmt = jdbcPooledConnection.getCachedStatement(cacheKey);
            if (cachedStmt == null) {
                PreparedStatement stmt = delegate.prepareStatement(sql);
                cachedStmt = JdbcProxyFactory.INSTANCE.getProxyPreparedStatement(jdbcPooledConnection, stmt, cacheKey);
                jdbcPooledConnection.putCachedStatement(cacheKey, cachedStmt);
View Full Code Here

Examples of br.com.caelum.vraptor.actioncache.CacheKey

  }

  public void execute(@Observes @CachedAction CachedMethodExecuted event) {
    final Cached cached = event.getCached();
    final CharArrayWriterResponse charResponse = ProxyTargetInstance.get(response);
    actionCache.fetch(new CacheKey(cached, headers), new Callable<ActionCacheEntry>() {

      @Override
      public ActionCacheEntry call() throws Exception {
        String result = charResponse.getOutput();
        logger.debug("Caching response of controller method with key {}",cached.key());
View Full Code Here

Examples of com.ibatis.sqlmap.engine.cache.CacheKey

  }

  public CacheKey getCacheKey(RequestScope request, Object parameterObject) {
    Sql sql = request.getSql();
    ParameterMap pmap = sql.getParameterMap(request, parameterObject);
    CacheKey cacheKey = pmap.getCacheKey(request, parameterObject);
    cacheKey.update(id);
    cacheKey.update(baseCacheKey);
    cacheKey.update(sql.getSql(request, parameterObject)); //Fixes bug 953001
    return cacheKey;
  }
View Full Code Here

Examples of com.ibatis.sqlmap.engine.cache.CacheKey

    return n;
  }

  public Object executeQueryForObject(RequestScope request, Transaction trans, Object parameterObject, Object resultObject)
      throws SQLException {
    CacheKey cacheKey = getCacheKey(request, 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 com.ibatis.sqlmap.engine.cache.CacheKey

    return object;
  }

  public List executeQueryForList(RequestScope request, Transaction trans, Object parameterObject, int skipResults, int maxResults)
      throws SQLException {
    CacheKey cacheKey = getCacheKey(request, parameterObject);
    cacheKey.update("executeQueryForList");
    cacheKey.update(skipResults);
    cacheKey.update(maxResults);
    Object listAsObject = cacheModel.getObject(cacheKey);
    List list;
    if(listAsObject == CacheModel.NULL_OBJECT){
      // The cached object was null
      list = null;
View Full Code Here

Examples of com.ibatis.sqlmap.engine.cache.CacheKey

      throws SQLException {
    statement.executeQueryWithRowHandler(request, trans, parameterObject, rowHandler);
  }

  public CacheKey getCacheKey(RequestScope request, Object parameterObject) {
    CacheKey key = statement.getCacheKey(request, parameterObject);
    if (!cacheModel.isReadOnly() && !cacheModel.isSerialize()) {
      key.update(request.getSession());
    }
    return key;
  }
View Full Code Here

Examples of com.ibatis.sqlmap.engine.cache.CacheKey

  public boolean equals(Object obj) {
    return this == obj;
  }

  public int hashCode() {
    CacheKey key = new CacheKey();
    if (txManager != null) {
      key.update(txManager);
      if (txManager.getDataSource() != null) {
        key.update(txManager.getDataSource());
      }
    }
    key.update(System.identityHashCode(this));
    return key.hashCode();
  }
View Full Code Here

Examples of com.ibatis.sqlmap.engine.cache.CacheKey

    return n;
  }

  public Object executeQueryForObject(RequestScope request, Transaction trans, Object parameterObject, Object resultObject)
      throws SQLException {
    CacheKey cacheKey = getCacheKey(request, 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 com.ibatis.sqlmap.engine.cache.CacheKey

    return object;
  }

  public List executeQueryForList(RequestScope request, Transaction trans, Object parameterObject, int skipResults, int maxResults)
      throws SQLException {
    CacheKey cacheKey = getCacheKey(request, parameterObject);
    cacheKey.update("executeQueryForList");
    cacheKey.update(skipResults);
    cacheKey.update(maxResults);
    Object listAsObject = cacheModel.getObject(cacheKey);
    List list;
    if(listAsObject == CacheModel.NULL_OBJECT){
      // The cached object was null
      list = null;
View Full Code Here

Examples of com.ibatis.sqlmap.engine.cache.CacheKey

      throws SQLException {
    statement.executeQueryWithRowHandler(request, trans, parameterObject, rowHandler);
  }

  public CacheKey getCacheKey(RequestScope request, Object parameterObject) {
    CacheKey key = statement.getCacheKey(request, parameterObject);
    if (!cacheModel.isReadOnly() && !cacheModel.isSerialize()) {
      key.update(request.getSession());
    }
    return key;
  }
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.