Package io.resys.hdes.client.spi
Class ImmutableGitConfig.Builder
java.lang.Object
io.resys.hdes.client.spi.ImmutableGitConfig.Builder
- Enclosing class:
- ImmutableGitConfig
@NotThreadSafe public static final class ImmutableGitConfig.Builder extends Object
Builds instances of type
ImmutableGitConfig.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and Type Method Description ImmutableGitConfig.BuilderabsoluteAssetsPath(String absoluteAssetsPath)Initializes the value for theabsoluteAssetsPathattribute.ImmutableGitConfig.BuilderabsolutePath(String absolutePath)Initializes the value for theabsolutePathattribute.ImmutableGitConfig.BuilderassetsPath(String assetsPath)Initializes the value for theassetsPathattribute.ImmutableGitConfigbuild()Builds a newImmutableGitConfig.ImmutableGitConfig.BuildercacheHeap(Integer cacheHeap)Initializes the value for thecacheHeapattribute.ImmutableGitConfig.BuildercacheManager(org.ehcache.CacheManager cacheManager)Initializes the value for thecacheManagerattribute.ImmutableGitConfig.BuildercacheName(String cacheName)Initializes the value for thecacheNameattribute.ImmutableGitConfig.Buildercallback(org.eclipse.jgit.api.TransportConfigCallback callback)Initializes the value for thecallbackattribute.ImmutableGitConfig.Builderclient(org.eclipse.jgit.api.Git client)Initializes the value for theclientattribute.ImmutableGitConfig.Buildercreds(HdesStore.HdesCredsSupplier creds)Initializes the value for thecredsattribute.ImmutableGitConfig.Builderfrom(GitConfig instance)Fill a builder with attribute values from the providedGitConfiginstance.ImmutableGitConfig.Builderinit(GitConfig.GitInit init)Initializes the value for theinitattribute.ImmutableGitConfig.Builderlocation(StoreEntityLocation location)Initializes the value for thelocationattribute.ImmutableGitConfig.BuilderparentPath(Path parentPath)Initializes the value for theparentPathattribute.ImmutableGitConfig.Builderserializer(GitConfig.GitSerializer serializer)Initializes the value for theserializerattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedGitConfiginstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
init
Initializes the value for theinitattribute.- Parameters:
init- The value for init- Returns:
thisbuilder for use in a chained invocation
-
location
@CanIgnoreReturnValue public final ImmutableGitConfig.Builder location(StoreEntityLocation location)Initializes the value for thelocationattribute.- Parameters:
location- The value for location- Returns:
thisbuilder for use in a chained invocation
-
serializer
@CanIgnoreReturnValue public final ImmutableGitConfig.Builder serializer(GitConfig.GitSerializer serializer)Initializes the value for theserializerattribute.- Parameters:
serializer- The value for serializer- Returns:
thisbuilder for use in a chained invocation
-
creds
@CanIgnoreReturnValue public final ImmutableGitConfig.Builder creds(HdesStore.HdesCredsSupplier creds)Initializes the value for thecredsattribute.- Parameters:
creds- The value for creds- Returns:
thisbuilder for use in a chained invocation
-
cacheManager
@CanIgnoreReturnValue public final ImmutableGitConfig.Builder cacheManager(org.ehcache.CacheManager cacheManager)Initializes the value for thecacheManagerattribute.- Parameters:
cacheManager- The value for cacheManager- Returns:
thisbuilder for use in a chained invocation
-
cacheName
Initializes the value for thecacheNameattribute.- Parameters:
cacheName- The value for cacheName- Returns:
thisbuilder for use in a chained invocation
-
cacheHeap
Initializes the value for thecacheHeapattribute.- Parameters:
cacheHeap- The value for cacheHeap- Returns:
thisbuilder for use in a chained invocation
-
assetsPath
Initializes the value for theassetsPathattribute.- Parameters:
assetsPath- The value for assetsPath- Returns:
thisbuilder for use in a chained invocation
-
parentPath
Initializes the value for theparentPathattribute.- Parameters:
parentPath- The value for parentPath- Returns:
thisbuilder for use in a chained invocation
-
absolutePath
Initializes the value for theabsolutePathattribute.- Parameters:
absolutePath- The value for absolutePath- Returns:
thisbuilder for use in a chained invocation
-
absoluteAssetsPath
@CanIgnoreReturnValue public final ImmutableGitConfig.Builder absoluteAssetsPath(String absoluteAssetsPath)Initializes the value for theabsoluteAssetsPathattribute.- Parameters:
absoluteAssetsPath- The value for absoluteAssetsPath- Returns:
thisbuilder for use in a chained invocation
-
callback
@CanIgnoreReturnValue public final ImmutableGitConfig.Builder callback(org.eclipse.jgit.api.TransportConfigCallback callback)Initializes the value for thecallbackattribute.- Parameters:
callback- The value for callback- Returns:
thisbuilder for use in a chained invocation
-
client
@CanIgnoreReturnValue public final ImmutableGitConfig.Builder client(org.eclipse.jgit.api.Git client)Initializes the value for theclientattribute.- Parameters:
client- The value for client- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableGitConfig.- Returns:
- An immutable instance of GitConfig
- Throws:
IllegalStateException- if any required attributes are missing
-