@SuppressWarnings("unchecked") public T withPort(int port) { setPort(port); return (T) this; }
@SuppressWarnings("unchecked") public T withSmartClient(boolean smartClient) { setSmartClient(smartClient); return (T) this; }
@SuppressWarnings("unchecked") public T withNamespace(String namespace) { setNamespace(namespace); return (T) this; }
/** * Single endpoint constructor (disables smart-client). */ public ObjectConfig(URI endpoint) { this(Protocol.valueOf(endpoint.getScheme().toUpperCase()), endpoint.getPort(), endpoint.getHost()); setRootContext(endpoint.getPath()); setSmartClient(false); }
public static Range fromOffsetLength(long offset, long length) { return new Range(offset, offset + length - 1); }
@SuppressWarnings("unchecked") public T withIdentity(String identity) { setIdentity(identity); return (T) this; }
@SuppressWarnings("unchecked") public T withUserAgent(String userAgent) { setUserAgent(userAgent); return (T) this; }
@SuppressWarnings("unchecked") public T withChunkedEncodingSize(int chunkedEncodingSize) { setChunkedEncodingSize(chunkedEncodingSize); return (T) this; }
/** * @deprecated (2.0.3) this method does nothing. EncryptionConfig instance should be passed to the constructor of * an encryption client */ @SuppressWarnings("unchecked") public T withEncryptionConfig(EncryptionConfig encryptionConfig) { setEncryptionConfig(encryptionConfig); return (T) this; }
@SuppressWarnings("unchecked") public T withProperty(String propName, Object value) { setProperty(propName, value); return (T) this; }
/** * @deprecated (2.0.4) use {@link #getRawQueryString()} instead */ public final String getQueryString() { return getRawQueryString(); }
/** * @see #setKeySize(int) */ public EncryptionConfig withKeySize(int keySize) { setKeySize(keySize); return this; }
/** * @see #setSecurityProvider(Provider) */ public EncryptionConfig withSecurityProvider(Provider provider) { setSecurityProvider(provider); return this; }
public EncryptionConfig withCompressionSpec(String compressionSpec) { setCompressionSpec(compressionSpec); return this; } }
@SuppressWarnings("unchecked") public T withRootContext(String rootContext) { setRootContext(rootContext); return (T) this; }
@SuppressWarnings("unchecked") public T withSecretKey(String secretKey) { setSecretKey(secretKey); return (T) this; }
@SuppressWarnings("unchecked") public T withGeoPinningEnabled(boolean geoPinningEnabled) { setGeoPinningEnabled(geoPinningEnabled); return (T) this; }
public EncryptionConfig withEncryptionSpec(String encryptionSpec) { setEncryptionSpec(encryptionSpec); return this; }
public EncryptionConfig withCompressionEnabled(boolean compressionEnabled) { setCompressionEnabled(compressionEnabled); return this; }
public static Range fromOffset(long offset) { return new Range(offset, null); }