throw new NullPointerException("The cache parameter passed in is null");
}
// If invocationBatching is not enabled, throw a new configuration exception.
if (!cache.getCacheConfiguration().invocationBatching().enabled()) {
throw new CacheConfigurationException("invocationBatching is not enabled for cache '" +
cache.getName() + "'. Make sure this is enabled by" +
" calling configurationBuilder.invocationBatching().enable()");
}
return new TreeCacheImpl<K, V>(cache);