@Test(expected = IllegalStateException.class) public void testInvalidMaxServiceInstanceIdleTime() { ServiceCachingPolicyBuilder builder = new ServiceCachingPolicyBuilder(); builder.withMaxServiceInstanceIdleTime(0, TimeUnit.MILLISECONDS); }
public ServiceCachingPolicyBuilder withMaxServiceInstanceIdleTime(int maxServiceInstanceIdleTime, TimeUnit unit) { checkState(maxServiceInstanceIdleTime > 0); checkNotNull(unit); _maxServiceInstanceIdleTimeNanos = unit.toNanos(maxServiceInstanceIdleTime); return this; }
ServiceCachingPolicyBuilder { public ServiceCachingPolicyBuilder withMaxServiceInstanceIdleTime(int maxServiceInstanceIdleTime, TimeUnit unit) { checkState(maxServiceInstanceIdleTime > 0); checkNotNull(unit); _maxServiceInstanceIdleTimeNanos = unit.toNanos(maxServiceInstanceIdleTime); return this; } }
ServiceCachingPolicyBuilder { public ServiceCachingPolicyBuilder withMaxServiceInstanceIdleTime(int maxServiceInstanceIdleTime, TimeUnit unit) { checkState(maxServiceInstanceIdleTime > 0); checkNotNull(unit); _maxServiceInstanceIdleTimeNanos = unit.toNanos(maxServiceInstanceIdleTime); return this; }  }
ServiceCachingPolicyBuilder { public ServiceCachingPolicyBuilder withMaxServiceInstanceIdleTime(int maxServiceInstanceIdleTime, TimeUnit unit) { checkState(maxServiceInstanceIdleTime > 0); checkNotNull(unit); _maxServiceInstanceIdleTimeNanos = unit.toNanos(maxServiceInstanceIdleTime); 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 withMaxServiceInstanceIdleTime(int maxServiceInstanceIdleTime, TimeUnit unit) { checkState(maxServiceInstanceIdleTime > 0); checkNotNull(unit); _maxServiceInstanceIdleTimeNanos = unit.toNanos(maxServiceInstanceIdleTime); 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; }