Interface ServiceCacheBuilder<T>


  • public interface ServiceCacheBuilder<T>
    • Method Detail

      • build

        ServiceCache<T> build()
        Return a new service cache with the current settings
        Returns:
        service cache
      • name

        ServiceCacheBuilder<T> name​(java.lang.String name)
        The name of the service to cache (required)
        Parameters:
        name - service name
        Returns:
        this
      • threadFactory

        ServiceCacheBuilder<T> threadFactory​(java.util.concurrent.ThreadFactory threadFactory)
        Optional 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

        ServiceCacheBuilder<T> executorService​(java.util.concurrent.ExecutorService 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

        ServiceCacheBuilder<T> executorService​(org.apache.curator.utils.CloseableExecutorService executorService)
        Optional CloseableExecutorService to use for the cache's background thread. The specified ExecutorService overrides any prior ThreadFactory or ExecutorService set on the ServiceCacheBuilder.
        Parameters:
        executorService - an instance of CloseableExecutorService
        Returns:
        this