Interface CuratorCacheBuilder
-
public interface CuratorCacheBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CuratorCachebuild()Return a new Curator Cache based on the builder methods that have been calledCuratorCacheBuilderwithExceptionHandler(java.util.function.Consumer<java.lang.Exception> exceptionHandler)By default any unexpected exception is handled by logging the exception.CuratorCacheBuilderwithOptions(CuratorCache.Options... options)CuratorCacheBuilderwithStorage(CuratorCacheStorage storage)Alternate storage to use.
-
-
-
Method Detail
-
withOptions
CuratorCacheBuilder withOptions(CuratorCache.Options... options)
- Parameters:
options- any options- Returns:
- this
-
withStorage
CuratorCacheBuilder withStorage(CuratorCacheStorage storage)
Alternate storage to use. If not specified,CuratorCacheStorage.standard()is used- Parameters:
storage- storage instance to use- Returns:
- this
-
withExceptionHandler
CuratorCacheBuilder withExceptionHandler(java.util.function.Consumer<java.lang.Exception> exceptionHandler)
By default any unexpected exception is handled by logging the exception. You can change so that a handler is called instead. Under normal circumstances, this shouldn't be necessary.- Parameters:
exceptionHandler- exception handler to use
-
build
CuratorCache build()
Return a new Curator Cache based on the builder methods that have been called- Returns:
- new Curator Cache
-
-