public interface ServiceCacheBuilder<T>
Modifier and Type | Method and Description |
---|---|
ServiceCache<T> |
build()
Return a new service cache with the current settings
|
ServiceCacheBuilder<T> |
executorService(CloseableExecutorService executorService)
Optional CloseableExecutorService to use for the cache's background thread.
|
ServiceCacheBuilder<T> |
executorService(ExecutorService executorService)
Optional ExecutorService to use for the cache's background thread.
|
ServiceCacheBuilder<T> |
name(String name)
The name of the service to cache (required)
|
ServiceCacheBuilder<T> |
threadFactory(ThreadFactory threadFactory)
Optional thread factory to use for the cache's internal thread.
|
ServiceCache<T> build()
ServiceCacheBuilder<T> name(String name)
name
- service nameServiceCacheBuilder<T> threadFactory(ThreadFactory threadFactory)
threadFactory
- factoryServiceCacheBuilder<T> executorService(ExecutorService executorService)
executorService
- executor serviceServiceCacheBuilder<T> executorService(CloseableExecutorService executorService)
executorService
- an instance of CloseableExecutorServiceCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.