Package com.ibatis.sqlmap.engine.cache

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


  }

  private void addCacheModelNodelets() {
    parser.addNodelet("/sqlMap/cacheModel", new Nodelet() {
      public void process(Node node) throws Exception {
        vars.currentCacheModel = new CacheModel();
        vars.currentProperties = new Properties();
      }
    });
    parser.addNodelet("/sqlMap/cacheModel/end()", new Nodelet() {
      public void process(Node node) throws Exception {
View Full Code Here


      public void process(Node node) throws Exception {
        Iterator cacheNames = vars.client.getDelegate().getCacheModelNames();

        while (cacheNames.hasNext()) {
          String cacheName = (String) cacheNames.next();
          CacheModel cacheModel = vars.client.getDelegate().getCacheModel(cacheName);
          Iterator statementNames = cacheModel.getFlushTriggerStatementNames();
          while (statementNames.hasNext()) {
            String statementName = (String) statementNames.next();
            MappedStatement statement = vars.client.getDelegate().getMappedStatement(statementName);
            if (statement != null) {
              statement.addExecuteListener(cacheModel);
View Full Code Here

   *
   * @param id - the ID
   * @return - the cache model
   */
  public CacheModel getCacheModel(String id) {
    CacheModel model = (CacheModel) cacheModels.get(id);
    if (model == null) {
      throw new SqlMapException("There is no cache model named " + id + " in this SqlMap.");
    }
    return model;
  }
View Full Code Here

   * Flush a single cache by ID
   *
   * @param id - the ID
   */
  public void flushDataCache(String id) {
    CacheModel model = getCacheModel(id);
    if (model != null) {
      model.flush();
    }
  }
View Full Code Here

    vars.errorCtx.setMoreInfo(null);
    vars.errorCtx.setObjectId(null);

    statement.setSqlMapClient(vars.client);
    if (cacheModelName != null && cacheModelName.length() > 0 && vars.client.getDelegate().isCacheModelsEnabled()) {
      CacheModel cacheModel = vars.client.getDelegate().getCacheModel(cacheModelName);
      return new CachingStatement(statement, cacheModel);
    } else {
      return statement;
    }
View Full Code Here

      public void process(Node node) throws Exception {
        Iterator cacheNames = vars.client.getDelegate().getCacheModelNames();

        while (cacheNames.hasNext()) {
          String cacheName = (String) cacheNames.next();
          CacheModel cacheModel = vars.client.getDelegate().getCacheModel(cacheName);
          Iterator statementNames = cacheModel.getFlushTriggerStatementNames();
          while (statementNames.hasNext()) {
            String statementName = (String) statementNames.next();
            MappedStatement statement = vars.client.getDelegate().getMappedStatement(statementName);
            if (statement != null) {
              statement.addExecuteListener(cacheModel);
View Full Code Here

   *
   * @param id - the ID
   * @return - the cache model
   */
  public CacheModel getCacheModel(String id) {
    CacheModel model = (CacheModel) cacheModels.get(id);
    if (model == null) {
      throw new SqlMapException("There is no cache model named " + id + " in this SqlMap.");
    }
    return model;
  }
View Full Code Here

   * Flush a single cache by ID
   *
   * @param id - the ID
   */
  public void flushDataCache(String id) {
    CacheModel model = getCacheModel(id);
    if (model != null) {
      model.flush();
    }
  }
View Full Code Here

  }

  private void addCacheModelNodelets() {
    parser.addNodelet("/sqlMap/cacheModel", new Nodelet() {
      public void process(Node node) throws Exception {
        vars.currentCacheModel = new CacheModel();
        vars.currentProperties = new Properties();
      }
    });
    parser.addNodelet("/sqlMap/cacheModel/end()", new Nodelet() {
      public void process(Node node) throws Exception {
View Full Code Here

    vars.errorCtx.setMoreInfo(null);
    vars.errorCtx.setObjectId(null);

    statement.setSqlMapClient(vars.client);
    if (cacheModelName != null && cacheModelName.length() > 0 && vars.client.getDelegate().isCacheModelsEnabled()) {
      CacheModel cacheModel = vars.client.getDelegate().getCacheModel(cacheModelName);
      return new CachingStatement(statement, cacheModel);
    } else {
      return statement;
    }
View Full Code Here

TOP

Related Classes of com.ibatis.sqlmap.engine.cache.CacheModel

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.