Package com.github.ambry.config
Class FrontendConfig
- java.lang.Object
-
- com.github.ambry.config.FrontendConfig
-
public class FrontendConfig extends java.lang.Object
Configuration parameters required by the Ambry frontend.
-
-
Field Summary
Fields Modifier and Type Field Description boolean
allowServiceIdBasedPostRequest
Boolean indicator to specify if frontend should allow the post requests that carry serviceId used as target account name.boolean
attachTrackingInfo
Boolean indicator to specify if tracking information should be attached to responses.long
cacheValiditySeconds
Cache validity in seconds for non-private blobs for GET.static java.lang.String
CHUNK_UPLOAD_INITIAL_CHUNK_TTL_SECS_KEY
java.lang.Integer
chunkedGetResponseThresholdInBytes
Specifies the blob size in bytes beyond which chunked response will be sent for a getBlob() calllong
chunkUploadInitialChunkTtlSecs
The blob TTL in seconds to use for data chunks uploaded in a stitched upload session.GetOption
defaultRouterGetOption
The defaultGetOption
that the frontend has to use when constructingGetBlobOptions
forRouter.getBlob(String, GetBlobOptions)
(or the callback equivalent).static java.lang.String
ENABLE_STORAGE_QUOTA_SERVICE
static java.lang.String
ENABLE_UNDELETE
boolean
enableStorageQuotaService
Set to true to enable storage quota in frontend.boolean
enableUndelete
Set to true to enable undelete in frontend.static java.lang.String
FAIL_IF_TTL_REQUIRED_BUT_NOT_PROVIDED_KEY
boolean
failIfTtlRequiredButNotProvided
java.lang.String
idConverterFactory
The IdConverterFactory that needs to be used by FrontendRestRequestService to convert IDs.java.lang.String
idSigningServiceFactory
static java.lang.String
MAX_ACCEPTABLE_TTL_SECS_IF_TTL_REQUIRED_KEY
static java.lang.String
MAX_JSON_REQUEST_SIZE_BYTES_KEY
int
maxAcceptableTtlSecsIfTtlRequired
int
maxJsonRequestSizeBytes
The maximum size in bytes for the JSON body of a "POST /stitch" request.static java.lang.String
NAMED_BLOB_DB_FACTORY
java.lang.String
namedBlobDbFactory
Can be set to a classname that implementsNamedBlobDbFactory
to enable named blob support.java.lang.String
optionsAllowMethods
Value of "Access-Control-Allow-Methods" in response headers for OPTIONS requests.long
optionsValiditySeconds
Value of "Access-Control-Max-Age" in response headers for OPTIONS requests.java.util.List<java.lang.String>
pathPrefixesToRemove
The comma separated list of prefixes to remove from paths.java.lang.String
securePathPrefix
The secure path to validate if required for certain container.java.lang.String
securityServiceFactory
The SecurityServiceFactory that needs to be used by FrontendRestRequestService to validate requests.static java.lang.String
STORAGE_QUOTA_SERVICE_FACTORY
java.lang.String
storageQuotaServiceFactory
static java.lang.String
URL_SIGNER_ENDPOINTS
long
urlSignerDefaultMaxUploadSizeBytes
The default maximum size (in bytes) that can be uploaded using a signed POST URL unless otherwise specified at the time of URL creation (depends on implementation).long
urlSignerDefaultUrlTtlSecs
The default time (in seconds) for which a signed URL is valid unless otherwise specified at the time of URL creation (depends on implementation).java.lang.String
urlSignerEndpoints
The various endpoints for signed URLs, in JSON string.long
urlSignerMaxUrlTtlSecs
The maximum amount of time a signed URL is valid i.e.java.lang.String
urlSigningServiceFactory
The UrlSigningServiceFactory that needs to be used by FrontendRestRequestService to sign and verify URLs.
-
Constructor Summary
Constructors Constructor Description FrontendConfig(VerifiableProperties verifiableProperties)
-
-
-
Field Detail
-
URL_SIGNER_ENDPOINTS
public static final java.lang.String URL_SIGNER_ENDPOINTS
- See Also:
- Constant Field Values
-
CHUNK_UPLOAD_INITIAL_CHUNK_TTL_SECS_KEY
public static final java.lang.String CHUNK_UPLOAD_INITIAL_CHUNK_TTL_SECS_KEY
- See Also:
- Constant Field Values
-
FAIL_IF_TTL_REQUIRED_BUT_NOT_PROVIDED_KEY
public static final java.lang.String FAIL_IF_TTL_REQUIRED_BUT_NOT_PROVIDED_KEY
- See Also:
- Constant Field Values
-
MAX_ACCEPTABLE_TTL_SECS_IF_TTL_REQUIRED_KEY
public static final java.lang.String MAX_ACCEPTABLE_TTL_SECS_IF_TTL_REQUIRED_KEY
- See Also:
- Constant Field Values
-
MAX_JSON_REQUEST_SIZE_BYTES_KEY
public static final java.lang.String MAX_JSON_REQUEST_SIZE_BYTES_KEY
- See Also:
- Constant Field Values
-
ENABLE_UNDELETE
public static final java.lang.String ENABLE_UNDELETE
- See Also:
- Constant Field Values
-
ENABLE_STORAGE_QUOTA_SERVICE
public static final java.lang.String ENABLE_STORAGE_QUOTA_SERVICE
- See Also:
- Constant Field Values
-
STORAGE_QUOTA_SERVICE_FACTORY
public static final java.lang.String STORAGE_QUOTA_SERVICE_FACTORY
- See Also:
- Constant Field Values
-
NAMED_BLOB_DB_FACTORY
public static final java.lang.String NAMED_BLOB_DB_FACTORY
- See Also:
- Constant Field Values
-
cacheValiditySeconds
@Config("frontend.cache.validity.seconds") @Default("365 * 24 * 60 * 60") public final long cacheValiditySeconds
Cache validity in seconds for non-private blobs for GET.
-
optionsValiditySeconds
@Config("frontend.options.validity.seconds") @Default("24 * 60 * 60") public final long optionsValiditySeconds
Value of "Access-Control-Max-Age" in response headers for OPTIONS requests.
-
optionsAllowMethods
@Config("frontend.options.allow.methods") @Default("POST, GET, OPTIONS, HEAD, DELETE") public final java.lang.String optionsAllowMethods
Value of "Access-Control-Allow-Methods" in response headers for OPTIONS requests.
-
idConverterFactory
@Config("frontend.id.converter.factory") @Default("com.github.ambry.frontend.AmbryIdConverterFactory") public final java.lang.String idConverterFactory
The IdConverterFactory that needs to be used by FrontendRestRequestService to convert IDs.
-
securityServiceFactory
@Config("frontend.security.service.factory") @Default("com.github.ambry.frontend.AmbrySecurityServiceFactory") public final java.lang.String securityServiceFactory
The SecurityServiceFactory that needs to be used by FrontendRestRequestService to validate requests.
-
urlSigningServiceFactory
@Config("frontend.url.signing.service.factory") @Default("com.github.ambry.frontend.AmbryUrlSigningServiceFactory") public final java.lang.String urlSigningServiceFactory
The UrlSigningServiceFactory that needs to be used by FrontendRestRequestService to sign and verify URLs.
-
idSigningServiceFactory
@Config("frontend.id.signing.service.factory") @Default("com.github.ambry.frontend.AmbryIdSigningServiceFactory") public final java.lang.String idSigningServiceFactory
-
pathPrefixesToRemove
@Config("frontend.path.prefixes.to.remove") @Default("") public final java.util.List<java.lang.String> pathPrefixesToRemove
The comma separated list of prefixes to remove from paths.
-
securePathPrefix
@Config("frontend.secure.path.prefix") @Default("") public final java.lang.String securePathPrefix
The secure path to validate if required for certain container.
-
chunkedGetResponseThresholdInBytes
@Config("frontend.chunked.get.response.threshold.in.bytes") @Default("8192") public final java.lang.Integer chunkedGetResponseThresholdInBytes
Specifies the blob size in bytes beyond which chunked response will be sent for a getBlob() call
-
allowServiceIdBasedPostRequest
@Config("frontend.allow.service.id.based.post.request") @Default("true") public final boolean allowServiceIdBasedPostRequest
Boolean indicator to specify if frontend should allow the post requests that carry serviceId used as target account name.
-
attachTrackingInfo
@Config("frontend.attach.tracking.info") @Default("true") public final boolean attachTrackingInfo
Boolean indicator to specify if tracking information should be attached to responses.
-
urlSignerEndpoints
@Config("frontend.url.signer.endpoints") @Default("{\"POST\": \"http://localhost:1174\", \"GET\": \"http://localhost:1174\"}") public final java.lang.String urlSignerEndpoints
The various endpoints for signed URLs, in JSON string.
-
urlSignerDefaultMaxUploadSizeBytes
@Config("frontend.url.signer.default.max.upload.size.bytes") @Default("100 * 1024 * 1024") public final long urlSignerDefaultMaxUploadSizeBytes
The default maximum size (in bytes) that can be uploaded using a signed POST URL unless otherwise specified at the time of URL creation (depends on implementation).
-
urlSignerMaxUrlTtlSecs
@Config("frontend.url.signer.max.url.ttl.secs") @Default("60 * 60") public final long urlSignerMaxUrlTtlSecs
The maximum amount of time a signed URL is valid i.e. the highest TTL that requests for signed URLs can set.
-
urlSignerDefaultUrlTtlSecs
@Config("frontend.url.signer.default.url.ttl.secs") @Default("5 * 60") public final long urlSignerDefaultUrlTtlSecs
The default time (in seconds) for which a signed URL is valid unless otherwise specified at the time of URL creation (depends on implementation).
-
defaultRouterGetOption
@Config("frontend.default.router.get.option") @Default("GetOption.None") public final GetOption defaultRouterGetOption
The defaultGetOption
that the frontend has to use when constructingGetBlobOptions
forRouter.getBlob(String, GetBlobOptions)
(or the callback equivalent).
-
chunkUploadInitialChunkTtlSecs
@Config("frontend.chunk.upload.initial.chunk.ttl.secs") @Default("28 * 24 * 60 * 60") public final long chunkUploadInitialChunkTtlSecs
The blob TTL in seconds to use for data chunks uploaded in a stitched upload session.
-
failIfTtlRequiredButNotProvided
@Config("frontend.fail.if.ttl.required.but.not.provided") @Default("false") public final boolean failIfTtlRequiredButNotProvided
-
maxAcceptableTtlSecsIfTtlRequired
@Config("frontend.max.acceptable.ttl.secs.if.ttl.required") @Default("30 * 24 * 60 * 60") public final int maxAcceptableTtlSecsIfTtlRequired
-
maxJsonRequestSizeBytes
@Config("frontend.max.json.request.size.bytes") @Default("20 * 1024 * 1024") public final int maxJsonRequestSizeBytes
The maximum size in bytes for the JSON body of a "POST /stitch" request.
-
enableUndelete
@Config("frontend.enable.undelete") @Default("false") public final boolean enableUndelete
Set to true to enable undelete in frontend.
-
enableStorageQuotaService
@Config("frontend.enable.storage.quota.service") @Default("false") public final boolean enableStorageQuotaService
Set to true to enable storage quota in frontend.
-
storageQuotaServiceFactory
@Config("frontend.storage.quota.service.factory") @Default("com.github.ambry.quota.AmbryStorageQuotaServiceFactory") public final java.lang.String storageQuotaServiceFactory
-
namedBlobDbFactory
@Config("frontend.named.blob.db.factory") @Default("null") public final java.lang.String namedBlobDbFactory
Can be set to a classname that implementsNamedBlobDbFactory
to enable named blob support.
-
-
Constructor Detail
-
FrontendConfig
public FrontendConfig(VerifiableProperties verifiableProperties)
-
-