Class S3ConfigFactory

    • 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 of S3Config 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 config
        propertyName - 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