Java 类com.amazonaws.geo.GeoDataManager 实例源码

项目:dynamodb-geo    文件:GeoDynamoDBServlet.java   
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);
}
项目:UnitedWayRESTBackend    文件:DynamoServiceFactory.java   
public DynamoGeoService createDynamoGeoService(String tableName) {
    GeoDataManagerConfiguration config = new GeoDataManagerConfiguration(createDynamoClient(), tableName);
    return new DynamoGeoService(new GeoDataManager(config));
}
项目:UnitedWayRESTBackend    文件:DynamoGeoService.java   
public DynamoGeoService(GeoDataManager geoDataManager) {
    this.geoDataManager = geoDataManager;

    createTableIfNotExisting();

    waitForTableToBeReady();
}