@Test(expected = IllegalStateException.class) public void testInvalidMaxNumServiceInstances() { ServiceCachingPolicyBuilder builder = new ServiceCachingPolicyBuilder(); builder.withMaxNumServiceInstances(-1); }
public ServiceCachingPolicyBuilder withMaxNumServiceInstances(int maxNumServiceInstances) { checkState(maxNumServiceInstances >= 0); _maxNumServiceInstances = maxNumServiceInstances; return this; }
ServiceCachingPolicyBuilder { public ServiceCachingPolicyBuilder withMaxNumServiceInstances(int maxNumServiceInstances) { checkState(maxNumServiceInstances >= 0); _maxNumServiceInstances = maxNumServiceInstances; return this; } }
ServiceCachingPolicyBuilder { public ServiceCachingPolicyBuilder withMaxNumServiceInstances(int maxNumServiceInstances) { checkState(maxNumServiceInstances >= 0); _maxNumServiceInstances = maxNumServiceInstances; return this; }  }
ServiceCachingPolicyBuilder { public ServiceCachingPolicyBuilder withMaxNumServiceInstances(int maxNumServiceInstances) { checkState(maxNumServiceInstances >= 0); _maxNumServiceInstances = maxNumServiceInstances; return this; }  static ServiceCachingPolicy getMultiThreadedClientPolicy(); ServiceCachingPolicyBuilder withMaxNumServiceInstances(int maxNumServiceInstances); ServiceCachingPolicyBuilder withMaxNumServiceInstancesPerEndPoint(int maxNumServiceInstancesPerEndPoint); ServiceCachingPolicyBuilder withMaxServiceInstanceIdleTime(int maxServiceInstanceIdleTime, TimeUnit unit); ServiceCachingPolicyBuilder withCacheExhaustionAction(ExhaustionAction action); ServiceCachingPolicy build(); }
ServiceCachingPolicyBuilder { public ServiceCachingPolicyBuilder withMaxNumServiceInstances(int maxNumServiceInstances) { checkState(maxNumServiceInstances >= 0); _maxNumServiceInstances = maxNumServiceInstances; return this; }  static ServiceCachingPolicy getMultiThreadedClientPolicy(); ServiceCachingPolicyBuilder withMaxNumServiceInstances(int maxNumServiceInstances); ServiceCachingPolicyBuilder withMaxNumServiceInstancesPerEndPoint(int maxNumServiceInstancesPerEndPoint); ServiceCachingPolicyBuilder withMaxServiceInstanceIdleTime(int maxServiceInstanceIdleTime, TimeUnit unit); ServiceCachingPolicyBuilder withCacheExhaustionAction(ExhaustionAction action); ServiceCachingPolicy build(); static final ServiceCachingPolicy NO_CACHING; }