Class S3ConfigFactory
java.lang.Object
com.atlassian.confluence.impl.pages.attachments.objectstorage.S3ConfigFactory
Factory for creating
AttachmentDataFileSystem
instances. If there are S3 properties set, then an
ObjectStorageAttachmentDataFileSystem
will be returned. Otherwise, it returns an instance of
ContentDirectoryStructureAttachmentDataFileSystemAdapter
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Property storing S3 bucket name.static final String
Property storing S3 bucket region.static final String
Property for setting the amount of time to wait when acquiring a connection from the pool used by S3 Apache HTTP client before giving up and timing out.static final String
Property storing S3 service endpoint override.static final String
Property for setting the maximum number of connections allowed in the connection pool used by S3 Apache HTTP Client. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable String
getConfigProperty
(com.atlassian.config.ApplicationConfiguration appConfig, ClusterConfigurationHelperInternal clusterConfigurationHelper, String propertyName) Loads property from different sources in this order: 1.static Optional<com.atlassian.dc.filestore.impl.s3.S3Config>
getInstance
(com.atlassian.config.ApplicationConfiguration appConfig, ClusterConfigurationHelperInternal clusterConfigurationHelper, LicenseService licenseService) Produces instance ofS3Config
based on the defined properties.
-
Field Details
-
S3_BUCKET_NAME_PROPERTY_NAME
Property storing S3 bucket name.- See Also:
-
S3_BUCKET_REGION_PROPERTY_NAME
Property storing S3 bucket region.- See Also:
-
S3_ENDPOINT_OVERRIDE
Property storing S3 service endpoint override.- See Also:
-
S3_MAX_CONNECTIONS
Property for setting the maximum number of connections allowed in the connection pool used by S3 Apache HTTP Client. See for more info Integer value as a string- See Also:
-
S3_CONNECTION_ACQUISITION_TIMEOUT_MILLIS
Property for setting the amount of time to wait when acquiring a connection from the pool used by S3 Apache HTTP client before giving up and timing out. See for more info Millisecond value as a string- See Also:
-
-
Method Details
-
getInstance
public static Optional<com.atlassian.dc.filestore.impl.s3.S3Config> getInstance(com.atlassian.config.ApplicationConfiguration appConfig, ClusterConfigurationHelperInternal clusterConfigurationHelper, LicenseService licenseService) Produces instance ofS3Config
based on the defined properties.- Parameters:
appConfig
- Application Configuration- Returns:
- new instance of
S3Config
or empty Optional if S3 properties have not been configured
-
getConfigProperty
public static @Nullable String getConfigProperty(com.atlassian.config.ApplicationConfiguration appConfig, ClusterConfigurationHelperInternal clusterConfigurationHelper, String propertyName) Loads property from different sources in this order: 1. system property 2. shared home config file 3. local home config file- Parameters:
appConfig
- application configpropertyName
- property name to load- Returns:
- value of the property if defined, null otherwise
-