public TenantCache getChildTenantCache(ImmutableBytesWritable tenantId) {
TenantCache tenantCache = perTenantCacheMap.get(tenantId);
if (tenantCache == null) {
int maxTenantMemoryPerc = config.getInt(MAX_TENANT_MEMORY_PERC_ATTRIB, QueryServicesOptions.DEFAULT_MAX_TENANT_MEMORY_PERC);
int maxServerCacheTimeToLive = config.getInt(QueryServices.MAX_SERVER_CACHE_TIME_TO_LIVE_MS, QueryServicesOptions.DEFAULT_MAX_SERVER_CACHE_TIME_TO_LIVE_MS);
TenantCacheImpl newTenantCache = new TenantCacheImpl(new ChildMemoryManager(getMemoryManager(), maxTenantMemoryPerc), maxServerCacheTimeToLive);
tenantCache = perTenantCacheMap.putIfAbsent(tenantId, newTenantCache);
if (tenantCache == null) {
tenantCache = newTenantCache;
}
}