checkState(_maxNumServiceInstances == -1 || _maxNumServiceInstancesPerEndPoint <= _maxNumServiceInstances);
final int maxNumServiceInstances = _maxNumServiceInstances;
final int maxNumServiceInstancesPerEndPoint = _maxNumServiceInstancesPerEndPoint;
final long maxServiceInstanceIdleTimeNanos = _maxServiceInstanceIdleTimeNanos;
final ExhaustionAction cacheExhaustionAction = _cacheExhaustionAction;
return new ServiceCachingPolicy() {
@Override
public int getMaxNumServiceInstances() {
return maxNumServiceInstances;