org.apache.ibatis.builder.CacheRefResolver Java Examples

The following examples show how to use org.apache.ibatis.builder.CacheRefResolver. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XMLMapperBuilder.java    From Shop-for-JavaWeb with MIT License 5 votes vote down vote up
private void parsePendingChacheRefs() {
	Collection<CacheRefResolver> incompleteCacheRefs = configuration
			.getIncompleteCacheRefs();
	synchronized (incompleteCacheRefs) {
		Iterator<CacheRefResolver> iter = incompleteCacheRefs.iterator();
		while (iter.hasNext()) {
			try {
				iter.next().resolveCacheRef();
				iter.remove();
			} catch (IncompleteElementException e) {
				// Cache ref is still missing a resource...
			}
		}
	}
}
 
Example #2
Source File: XMLMapperBuilder.java    From Shop-for-JavaWeb with MIT License 5 votes vote down vote up
private void cacheRefElement(XNode context) {
	if (context != null) {
		configuration.addCacheRef(builderAssistant.getCurrentNamespace(),
				context.getStringAttribute("namespace"));
		CacheRefResolver cacheRefResolver = new CacheRefResolver(
				builderAssistant, context.getStringAttribute("namespace"));
		try {
			cacheRefResolver.resolveCacheRef();
		} catch (IncompleteElementException e) {
			configuration.addIncompleteCacheRef(cacheRefResolver);
		}
	}
}
 
Example #3
Source File: XMLMapperBuilder.java    From mybaties with Apache License 2.0 5 votes vote down vote up
private void parsePendingChacheRefs() {
  Collection<CacheRefResolver> incompleteCacheRefs = configuration.getIncompleteCacheRefs();
  synchronized (incompleteCacheRefs) {
    Iterator<CacheRefResolver> iter = incompleteCacheRefs.iterator();
    while (iter.hasNext()) {
      try {
        iter.next().resolveCacheRef();
        iter.remove();
      } catch (IncompleteElementException e) {
        // Cache ref is still missing a resource...
      }
    }
  }
}
 
Example #4
Source File: XMLMapperBuilder.java    From mybaties with Apache License 2.0 5 votes vote down vote up
private void cacheRefElement(XNode context) {
  if (context != null) {
    //增加cache-ref
    configuration.addCacheRef(builderAssistant.getCurrentNamespace(), context.getStringAttribute("namespace"));
    CacheRefResolver cacheRefResolver = new CacheRefResolver(builderAssistant, context.getStringAttribute("namespace"));
    try {
      cacheRefResolver.resolveCacheRef();
    } catch (IncompleteElementException e) {
      configuration.addIncompleteCacheRef(cacheRefResolver);
    }
  }
}
 
Example #5
Source File: XMLMapperBuilder.java    From mybatis with Apache License 2.0 5 votes vote down vote up
private void parsePendingChacheRefs() {
  Collection<CacheRefResolver> incompleteCacheRefs = configuration.getIncompleteCacheRefs();
  synchronized (incompleteCacheRefs) {
    Iterator<CacheRefResolver> iter = incompleteCacheRefs.iterator();
    while (iter.hasNext()) {
      try {
        iter.next().resolveCacheRef();
        iter.remove();
      } catch (IncompleteElementException e) {
        // Cache ref is still missing a resource...
      }
    }
  }
}
 
Example #6
Source File: XMLMapperBuilder.java    From mybatis with Apache License 2.0 5 votes vote down vote up
private void cacheRefElement(XNode context) {
  if (context != null) {
    //增加cache-ref
    configuration.addCacheRef(builderAssistant.getCurrentNamespace(), context.getStringAttribute("namespace"));
    CacheRefResolver cacheRefResolver = new CacheRefResolver(builderAssistant, context.getStringAttribute("namespace"));
    try {
      cacheRefResolver.resolveCacheRef();
    } catch (IncompleteElementException e) {
      configuration.addIncompleteCacheRef(cacheRefResolver);
    }
  }
}
 
Example #7
Source File: Configuration.java    From Shop-for-JavaWeb with MIT License 4 votes vote down vote up
public Collection<CacheRefResolver> getIncompleteCacheRefs() {
	return incompleteCacheRefs;
}
 
Example #8
Source File: Configuration.java    From Shop-for-JavaWeb with MIT License 4 votes vote down vote up
public void addIncompleteCacheRef(CacheRefResolver incompleteCacheRef) {
	incompleteCacheRefs.add(incompleteCacheRef);
}
 
Example #9
Source File: Configuration.java    From mybaties with Apache License 2.0 4 votes vote down vote up
public Collection<CacheRefResolver> getIncompleteCacheRefs() {
  return incompleteCacheRefs;
}
 
Example #10
Source File: Configuration.java    From mybaties with Apache License 2.0 4 votes vote down vote up
public void addIncompleteCacheRef(CacheRefResolver incompleteCacheRef) {
  incompleteCacheRefs.add(incompleteCacheRef);
}
 
Example #11
Source File: Configuration.java    From mybatis with Apache License 2.0 4 votes vote down vote up
public Collection<CacheRefResolver> getIncompleteCacheRefs() {
  return incompleteCacheRefs;
}
 
Example #12
Source File: Configuration.java    From mybatis with Apache License 2.0 4 votes vote down vote up
public void addIncompleteCacheRef(CacheRefResolver incompleteCacheRef) {
  incompleteCacheRefs.add(incompleteCacheRef);
}