Class Entity2DynamoDBTableSynchronizer<T,ID>
- java.lang.Object
-
- org.socialsignin.spring.data.dynamodb.repository.util.EntityInformationProxyPostProcessor<T,ID>
-
- org.socialsignin.spring.data.dynamodb.repository.util.Entity2DynamoDBTableSynchronizer<T,ID>
-
- All Implemented Interfaces:
java.util.EventListener,org.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>,org.springframework.data.repository.core.support.RepositoryProxyPostProcessor
public class Entity2DynamoDBTableSynchronizer<T,ID> extends EntityInformationProxyPostProcessor<T,ID> implements org.springframework.data.repository.core.support.RepositoryProxyPostProcessor, org.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>
This is the base class for all classes performing the validation or auto-creation of tables based on the entity classes. //TODO: It would be nice if the checks would run in parallel via a TaskScheduler (if available)- See Also:
Entity2DDL
-
-
Constructor Summary
Constructors Constructor Description Entity2DynamoDBTableSynchronizer(com.amazonaws.services.dynamodbv2.AmazonDynamoDB amazonDynamoDB, com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper mapper, java.lang.String mode, java.lang.String gsiProjectionType, long readCapacity, long writeCapacity)Entity2DynamoDBTableSynchronizer(com.amazonaws.services.dynamodbv2.AmazonDynamoDB amazonDynamoDB, com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper mapper, Entity2DDL mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonApplicationEvent(org.springframework.context.event.ApplicationContextEvent event)protected voidregisteredEntity(DynamoDBEntityInformation<T,ID> entityInformation)protected voidsynchronize(DynamoDBEntityInformation<T,ID> entityInformation, org.springframework.context.event.ApplicationContextEvent event)-
Methods inherited from class org.socialsignin.spring.data.dynamodb.repository.util.EntityInformationProxyPostProcessor
postProcess
-
-
-
-
Constructor Detail
-
Entity2DynamoDBTableSynchronizer
public Entity2DynamoDBTableSynchronizer(com.amazonaws.services.dynamodbv2.AmazonDynamoDB amazonDynamoDB, com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper mapper, Entity2DDL mode)
-
Entity2DynamoDBTableSynchronizer
@Autowired public Entity2DynamoDBTableSynchronizer(com.amazonaws.services.dynamodbv2.AmazonDynamoDB amazonDynamoDB, com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper mapper, @Value("${spring.data.dynamodb.entity2ddl.auto:none}") java.lang.String mode, @Value("${spring.data.dynamodb.entity2ddl.gsiProjectionType:ALL}") java.lang.String gsiProjectionType, @Value("${spring.data.dynamodb.entity2ddl.readCapacity:10}") long readCapacity, @Value("${spring.data.dynamodb.entity2ddl.writeCapacity:1}") long writeCapacity)
-
-
Method Detail
-
registeredEntity
protected void registeredEntity(DynamoDBEntityInformation<T,ID> entityInformation)
- Specified by:
registeredEntityin classEntityInformationProxyPostProcessor<T,ID>
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ApplicationContextEvent event)
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<T>
-
synchronize
protected void synchronize(DynamoDBEntityInformation<T,ID> entityInformation, org.springframework.context.event.ApplicationContextEvent event) throws com.amazonaws.services.dynamodbv2.util.TableUtils.TableNeverTransitionedToStateException, java.lang.InterruptedException
- Throws:
com.amazonaws.services.dynamodbv2.util.TableUtils.TableNeverTransitionedToStateExceptionjava.lang.InterruptedException
-
-