Permalink
Browse files

Allow setting service endpoint for S3.

  • Loading branch information...
1 parent 11e8149 commit 536910fcf63d968fb57697c34980ccb4d5eab727 @williamw520 committed Jun 27, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/wwutil/jsoda/Jsoda.java
@@ -78,6 +78,7 @@
private String globalPrefix;
private String defaultS3Bucket = "";
private String s3KeyPrefix = "";
+ private String s3EndPoint;
// Model registry
private Map<String, Class> modelClasses = new ConcurrentHashMap<String, Class>();
@@ -149,6 +150,19 @@ public String getDbEndpoint(DbType dbtype) {
return getDbService(dbtype).getDbEndpoint();
}
+ /** Set the AWS service endpoint for S3. Different AWS region might have different endpoint. */
+ public Jsoda setS3Endpoint(String endpoint) {
+ this.s3EndPoint = endpoint;
+ s3Client.setEndpoint(endpoint);
+ return this;
+ }
+
+ /** Get the AWS service endpoint for S3. Return null for using AWS default. */
+ public String getS3Endpoint() {
+ return this.s3EndPoint;
+ }
+
+
/** Set the global table prefix to add a prefix to all tables managed by the Jsoda object.
* The global prefix is added in front of any other per-model-class prefix defined in @Model.prefix.
* Global prefix is useful to scope all the tables for different purposes, e.g. creating test tables.

0 comments on commit 536910f

Please sign in to comment.