Interface ServiceCacheBuilder<T>


public interface ServiceCacheBuilder<T>
  • 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 ServiceCacheBuilder<T> threadFactory(ThreadFactory threadFactory)
      Deprecated.
      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(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