private void setupGeoDataManager() { String accessKey = System.getProperty("AWS_ACCESS_KEY_ID"); String secretKey = System.getProperty("AWS_SECRET_KEY"); String tableName = System.getProperty("PARAM1"); String regionName = System.getProperty("PARAM2"); AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey); AmazonDynamoDBClient ddb = new AmazonDynamoDBClient(credentials); Region region = Region.getRegion(Regions.fromName(regionName)); ddb.setRegion(region); config = new GeoDataManagerConfiguration(ddb, tableName); geoDataManager = new GeoDataManager(config); }
public DynamoGeoService createDynamoGeoService(String tableName) { GeoDataManagerConfiguration config = new GeoDataManagerConfiguration(createDynamoClient(), tableName); return new DynamoGeoService(new GeoDataManager(config)); }
public DynamoGeoService(GeoDataManager geoDataManager) { this.geoDataManager = geoDataManager; createTableIfNotExisting(); waitForTableToBeReady(); }