Package org.apache.curator.x.discovery
Interface ServiceCacheBuilder<T>
public interface ServiceCacheBuilder<T>
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Return a new service cache with the current settingsexecutorService
(ExecutorService executorService) Optional ExecutorService to use for the cache's background thread.The name of the service to cache (required)threadFactory
(ThreadFactory threadFactory) Deprecated.
-
Method Details
-
build
ServiceCache<T> build()Return a new service cache with the current settings- Returns:
- service cache
-
name
The name of the service to cache (required)- Parameters:
name
- service name- Returns:
- this
-
threadFactory
Deprecated.useexecutorService(ExecutorService)
insteadOptional thread factory to use for the cache's internal thread. The specified ExecutorService overrides any prior ThreadFactory or ExecutorService set on the ServiceCacheBuilder.- Parameters:
threadFactory
- factory- Returns:
- this
-
executorService
Optional ExecutorService to use for the cache's background thread. The specified ExecutorService will be wrapped in a CloseableExecutorService and overrides any prior ThreadFactory or ExecutorService set on the ServiceCacheBuilder.- Parameters:
executorService
- executor service- Returns:
- this
-
executorService(ExecutorService)
instead