/** * Instantiate a {@link JdbcTokenStore} based on the fields contained in the {@link Builder}. * <p> * Will assert that the {@link ConnectionProvider}, {@link Serializer}, {@link TokenSchema}, {@code claimTimeout}, * {@code nodeId} and {@code contentType} are not {@code null}, and will throw an {@link AxonConfigurationException} * if any of them is {@code null}. * * @param builder the {@link Builder} used to instantiate a {@link JdbcTokenStore} instance */ protected JdbcTokenStore(Builder builder) { builder.validate(); this.connectionProvider = builder.connectionProvider; this.serializer = builder.serializer; this.schema = builder.schema; this.claimTimeout = builder.claimTimeout; this.nodeId = builder.nodeId; this.contentType = builder.contentType; }
/** * Instantiate a {@link JdbcTokenStore} based on the fields contained in the {@link Builder}. * <p> * Will assert that the {@link ConnectionProvider}, {@link Serializer}, {@link TokenSchema}, {@code claimTimeout}, * {@code nodeId} and {@code contentType} are not {@code null}, and will throw an {@link AxonConfigurationException} * if any of them is {@code null}. * * @param builder the {@link Builder} used to instantiate a {@link JdbcTokenStore} instance */ protected JdbcTokenStore(Builder builder) { builder.validate(); this.connectionProvider = builder.connectionProvider; this.serializer = builder.serializer; this.schema = builder.schema; this.claimTimeout = builder.claimTimeout; this.nodeId = builder.nodeId; this.contentType = builder.contentType; }