Currently the connector supports 2 back-ends: Caringo Swarm and S3. They can be used separately or together - with e.g. DualContentStore from Xenit or the aggregating contentstore developed by Alfresco or by using the contentstore selector as described in the alfresco documentation.
Alfred Object Storage can be configured to create and configure
additional content stores by using custom properties in
alfresco-global.properties.
Content store configuration can be split into three main parts:
ContentService)The unique list of content store IDs is configured via
objectstorage.stores=myDualContentStore, mySwarmContentStore
An individual content store instance is configured by first specifying its type, and then setting any configuration properties or references as defined / required by that type. An example for the above list of content store IDs could be
# content store with ID 'mySwarmContentStore' is using the 'swarm' type
objectstorage.store.mySwarmContentStore.type=swarm
objectstorage.store.mySwarmContentStore.value.clusterName=swarm-cluster
objectstorage.store.mySwarmContentStore.list.value.initialSwarmNodes=swarm01, swarm02
# content store with ID 'myDualContentStore' is using the 'dual' type
objectstorage.store.myDualContentStore.type=dual
objectstorage.store.myDualContentStore.ref.mutableStore=mySwarmContentStore
objectstorage.store.myDualContentStore.ref.immutableStore=anotherContentStore
Alfred Object Storage uses a set of naming conventions for determining the full name of a configuration property. The following name patterns are in use:
${storeId}.value.${propertyName}=${value}${storeId}.ref.${propertyName}=${springBeanId}${storeId}.list.value.${propertyName}=${value}${storeId}.map.${propertyName}.value.${mapKey}=${value}${storeId}.map.${propertyName}.ref.${mapKey}=${springBeanId}Note: the Spring bean ID for custom stores is the same as the content store ID defined via objectstorage.stores.
By default the Alfresco ContentService will use the default file-based store for storing any content. If custom stores have been configured, this has to be changed to use one of the custom stores as the actual entry point into the configured custom ContentStore setup. Only one content store can be defined as the root store, and any other custom content stores need to be set up as delegates of this store (via its type-specific configuration options) or they will not be used at all.
The root store can be configured by specifying
objectstorage.rootStore=myDualContentStore
where the value must refer to a content store ID defined in the stores
list. If this property has not been configured, Alfresco’s default
ContentStore will be used.
One step of Alfresco’s node deletion process, is cleaning up orphaned
content. For
this task, Alfresco uses the EagerContentStoreCleaner component by
default ( see
JavaDoc.
Registering custom content stores for orphan content cleanup, can be done with following configuration property.
objectstorage.contentStoresToClean=mySwarmContentStore
ContentStore implementationsContentStoreIntegrates Alfresco with the Caringo Swarm Object-based Data Storage
| name | type | description | default | optional |
|---|---|---|---|---|
| clusterName | value | Name of the SWARM cluster. | no | |
| initialSwarmNodes | list | list of the IP of each SWARM node. | no | |
| maximumTotalConnections | value | maximum total of connections to SWARM cluster allowed simultaneously. | 200 | yes |
| maximumConnectionsPerHost | value | maximum total of connections per route value. | 100 | yes |
| connectionTimeout | value | used for both socketTimeout and connectionTimeout; in milliseconds; 0 = no timeout. | 10000 (= 10 sec) | yes |
| connectionTimeToLive | value | used for connection time to live; in milliseconds; 0 = no timeout. | 10000 (= 10 sec) | yes |
| maximumClusterAccessAttempts | value | Number of attempts to access each SWARM node consecutively before raising an error. | 3 | yes |
| lifePointHeader | value | lifePoint parameter, cfr. Swarm Application Guide | [] minreps=2, maxreps=3, deletable=no | yes |
| daysToKeepBeforeDelete | value | number of days that the document should be kept in SWARM after it has been deleted in Alfresco. Setting this to a negative value will disable the delete functionality. | -1 | yes |
| swarmDomain | value | SWARM domain name to use when storing/retrieving documents. | yes | |
| swarmBucket | value | SWARM bucket name to use when storing/retrieving documents. Leave blank to create immutable objects. | yes | |
| useLegacyProtocolId | value | if true, content url’s in Alfresco will have the castor://... format |
false | yes |
| credentials | value | SWARM credentials (when using content gateway). format: “username:password” | yes |
ContentStoreIntegrates Alfresco with the Amazon S3 Cloud storage
| name | type | description | default | optional |
|---|---|---|---|---|
| bucketName | value | The name of the Amazon S3 bucket to which object should be stored | no | |
| accessKey | value | The AWS access key. | yes | |
| secretKey | value | The AWS secret access key. | yes | |
| bucketLocation | value | https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region | eu-west-3 | yes |
| endpoint | value | The endpoint to be used for requests to AWS | yes | |
| connectionPoolSize | value | Maximum number of concurrent connections to S3 | 50 | yes |
| pathStyleAccessEnabled | value | Indicates if pathStyleAccess should be enabled | false | yes |
| connectionTTL | value | The expiration time (in milliseconds) for a connection in the connection pool | -1 | yes |
| connectionTimeout | value | The amount of time to wait (in milliseconds) when initially establishing a connection before giving up and timing out. | 10000 | yes |
| socketTimeout | value | The amount of time to wait (in milliseconds) for data to be transferred over an established, open connection before the connection times out and is closed. | 50000 | yes |
| clientExecutionTimeout | value | the amount of time (in milliseconds) to allow the client to complete the execution of an API call. | 0 | yes |
| requestTimeout | value | the amount of time to wait (in milliseconds) for the request to complete before giving up and timing out. | 0 | yes |
| connectionMaxIdleMillis | value | the maximum amount of time that an idle connection may sit in the connection pool and still be eligible for reuse. | 60000 | yes |
| maxConsecutiveRetriesBeforeThrottling | value | the maximum number of consecutive failed retries that the client will permit before throttling all subsequent retries of failed requests. | 100 | yes |
| maxErrorRetry | value | the maximum number of retry attempts for failed retryable requests (ex: 5xx error responses from services), and returns the updated ClientConfiguration object. -1 if the user has not explicitly set this value, in which case the configured RetryPolicy will be used to control the retry count. | -1 | yes |
for more information check the docs in https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html If no accessKey or secretKey is defined, the default credential provider chain provided by Amazon will be used. Have a look at the relevant documentation) for more information.
DualContentStoreProvides a proxy for dual storage. The mutable store is used for read and write operations. If the read operation fails, the immutable store is used to retrieve the content.
| name | type | description | default | optional |
|---|---|---|---|---|
| mutableStore | ref | the primary store which will be used for both read and write operations | no | |
| immutableStore | ref | the secondary store which will be used for read operations if the content is not found in the primary store | no |
objectstorage.stores=mySwarmContentStore
objectstorage.rootStore=mySwarmContentStore
objectstorage.store.mySwarmContentStore.type=swarm
objectstorage.store.mySwarmContentStore.value.clusterName=swarm-cluster
objectstorage.store.mySwarmContentStore.list.value.initialSwarmNodes=swarm01, swarm02
objectstorage.store.mySwarmContentStore.value.swarmDomain=swarm-domain
objectstorage.store.mySwarmContentStore.value.swarmBucket=swarm-bucket
objectstorage.store.mySwarmContentStore.value.credentials=user:password
objectstorage.store.mySwarmContentStore.value.lifePointHeader=[] minreps=2, maxreps=3, deletable=no
objectstorage.store.mySwarmContentStore.value.maximumTotalConnections=80
objectstorage.store.mySwarmContentStore.value.maximumConnectionsPerHost=20
objectstorage.store.mySwarmContentStore.value.connectionTimeout=5000
objectstorage.store.mySwarmContentStore.value.maximumClusterAccessAttempts=3