-
-
Save richardgrantserverless/bad4f07c3614ecb15075afc403556a11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.serverless.dal; | |
... | |
public class DynamoDBAdapter { | |
... | |
private DynamoDBAdapter() { | |
this.client = AmazonDynamoDBClientBuilder.standard() | |
.withRegion(Regions.US_EAST_1) | |
.build(); | |
} | |
public static DynamoDBAdapter getInstance() { | |
if (db_adapter == null) | |
db_adapter = new DynamoDBAdapter(); | |
return db_adapter; | |
} | |
... | |
public DynamoDBMapper createDbMapper(DynamoDBMapperConfig mapperConfig) { | |
if (this.client != null) | |
mapper = new DynamoDBMapper(this.client, mapperConfig); | |
return this.mapper; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment