Class S3ConfigFactory
- java.lang.Object
-
- com.atlassian.confluence.impl.pages.attachments.objectstorage.S3ConfigFactory
-
public class S3ConfigFactory extends Object
Factory for creatingAttachmentDataFileSystem
instances. If there are S3 properties set, then anObjectStorageAttachmentDataFileSystem
will be returned. Otherwise, it returns an instance ofContentDirectoryStructureAttachmentDataFileSystemAdapter
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
S3_BUCKET_NAME_PROPERTY_NAME
Property storing S3 bucket name.static String
S3_BUCKET_REGION_PROPERTY_NAME
Property storing S3 bucket region.static String
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.static String
S3_ENDPOINT_OVERRIDE
Property storing S3 service endpoint override.static String
S3_MAX_CONNECTIONS
Property for setting the maximum number of connections allowed in the connection pool used by S3 Apache HTTP Client.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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)
Produces instance ofS3Config
based on the defined properties.static boolean
isDataCenterLicense()
A method for determining whether the current license is a DC license
-
-
-
Field Detail
-
S3_BUCKET_NAME_PROPERTY_NAME
public static final String S3_BUCKET_NAME_PROPERTY_NAME
Property storing S3 bucket name.- See Also:
- Constant Field Values
-
S3_BUCKET_REGION_PROPERTY_NAME
public static final String S3_BUCKET_REGION_PROPERTY_NAME
Property storing S3 bucket region.- See Also:
- Constant Field Values
-
S3_ENDPOINT_OVERRIDE
public static final String S3_ENDPOINT_OVERRIDE
Property storing S3 service endpoint override.- See Also:
- Constant Field Values
-
S3_MAX_CONNECTIONS
public static final String 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:
- Constant Field Values
-
S3_CONNECTION_ACQUISITION_TIMEOUT_MILLIS
public static final String 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:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static Optional<com.atlassian.dc.filestore.impl.s3.S3Config> getInstance(com.atlassian.config.ApplicationConfiguration appConfig, ClusterConfigurationHelperInternal clusterConfigurationHelper)
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
@Nullable public static 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
-
isDataCenterLicense
public static boolean isDataCenterLicense()
A method for determining whether the current license is a DC license- Returns:
- true if the license is a DC license
-
-