Package com.exasol.bucketfs
Class ReadEnabledBucket.Builder<T extends ReadEnabledBucket.Builder<T>>
- java.lang.Object
-
- com.exasol.bucketfs.ReadEnabledBucket.Builder<T>
-
- Type Parameters:
T- type for self pointer to inheritable builder
- Direct Known Subclasses:
WriteEnabledBucket.Builder
- Enclosing class:
- ReadEnabledBucket
public static class ReadEnabledBucket.Builder<T extends ReadEnabledBucket.Builder<T>> extends Object
Builder forReadEnabledBucketobjects.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()Create a new instance ofReadEnabledBucket.Builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ReadOnlyBucketbuild()Build a newReadEnabledBucketinstance.Tcertificate(X509Certificate certificate)Use the given certificate for TLS connections.Thost(String host)Set the host of the BucketFS service.ThttpPort(int port)Deprecated.useport(int)instead.Tname(String bucketName)Set the bucket name.Tport(int port)Set the port the BucketFS service listens on.TraiseTlsErrors(boolean raise)Define if TLS errors should raise an error when executing requests or if they should be ignored.TreadPassword(String readPassword)Set the read password.protected Tself()Get self.TserviceName(String serviceName)Set the service name.TuseTls(boolean useTls)Define if you want to use TLS/HTTPS for connecting to the server.
-
-
-
Constructor Detail
-
Builder
protected Builder()
Create a new instance ofReadEnabledBucket.Builder.
-
-
Method Detail
-
self
protected T self()
Get self.- Returns:
- self
-
serviceName
public T serviceName(String serviceName)
Set the service name.- Parameters:
serviceName- name of the BucketFS service- Returns:
- Builder instance for fluent programming
-
name
public T name(String bucketName)
Set the bucket name.- Parameters:
bucketName- name of the bucket- Returns:
- Builder instance for fluent programming
-
useTls
public T useTls(boolean useTls)
Define if you want to use TLS/HTTPS for connecting to the server. Defaults to plain text HTTP.- Parameters:
useTls-trueto use the TLS/HTTPS protocol,falseto use plain text HTTP (default)- Returns:
- Builder instance for fluent programming
-
host
public T host(String host)
Set the host of the BucketFS service.- Parameters:
host- host of the BucketFS service- Returns:
- Builder instance for fluent programming
-
port
public T port(int port)
Set the port the BucketFS service listens on. Make sure to also calluseTls(boolean)with argumentfalseif this is an HTTP port ortrueif this is an HTTPS port.- Parameters:
port- HTTP or HTTPS port the BucketFS service listens on- Returns:
- Builder instance for fluent programming
-
httpPort
@Deprecated public T httpPort(int port)
Deprecated.useport(int)instead.Set the port the BucketFS service listens on. Make sure to also calluseTls(boolean)with argumentfalseif this is an HTTP port ortrueif this is an HTTPS port.- Parameters:
port- HTTP or HTTPS port the BucketFS service listens on- Returns:
- Builder instance for fluent programming
-
readPassword
public T readPassword(String readPassword)
Set the read password.- Parameters:
readPassword- read password to set- Returns:
- Builder instance for fluent programming
-
raiseTlsErrors
public T raiseTlsErrors(boolean raise)
Define if TLS errors should raise an error when executing requests or if they should be ignored. Setting this tofalseis required as the docker-db uses a self-signed certificate.Defaults to raise TLS errors.
Mutually exclusive with setting
raiseTlsErrors(boolean)tofalse.- Parameters:
raise-trueif theCommandFactoryshould fail for TLS errors,falseif it should ignore TLS errors.- Returns:
- Builder instance for fluent programming
-
certificate
public T certificate(X509Certificate certificate)
Use the given certificate for TLS connections.Defaults to using the certificates from the JVMs default key store.
Mutually exclusive with setting
raiseTlsErrors(boolean)tofalse.- Parameters:
certificate- certificate to use- Returns:
- Builder instance for fluent programming
-
build
public ReadOnlyBucket build()
Build a newReadEnabledBucketinstance.- Returns:
- read-enabled bucket instance
-
-