/** * Sets the {@code maxGapOffset} specifying the maximum distance in sequence numbers between a missing event and * the event with the highest known index. If the gap is bigger it is assumed that the missing event will not be * committed to the store anymore. This event storage engine will no longer look for those events the next time * a batch is fetched. Defaults to an integer of {@code 10000} * ({@link JdbcEventStorageEngine#DEFAULT_MAX_GAP_OFFSET}. * * @param maxGapOffset an {@code int} specifying the maximum distance in sequence numbers between a missing * event and the event with the highest known index * @return the current Builder instance, for fluent interfacing */ public Builder maxGapOffset(int maxGapOffset) { assertPositive(maxGapOffset, "maxGapOffset"); this.maxGapOffset = maxGapOffset; return this; }
/** * Sets the amount of time until a 'gap' in a TrackingToken may be considered timed out. This setting will * affect the cleaning process of gaps. Gaps that have timed out will be removed from Tracking Tokens to improve * performance of reading events. Defaults to an integer of {@code 60000} * ({@link JdbcEventStorageEngine#DEFAULT_GAP_TIMEOUT}), thus 1 minute. * * @param gapTimeout an {@code int} specifying the amount of time until a 'gap' in a TrackingToken may be * considered timed out * @return the current Builder instance, for fluent interfacing */ public Builder gapTimeout(int gapTimeout) { assertPositive(gapTimeout, "gapTimeout"); this.gapTimeout = gapTimeout; return this; }
/** * Sets the threshold of number of gaps in a token before an attempt to clean gaps up is taken. Defaults to an * integer of {@code 250} ({@link JdbcEventStorageEngine#DEFAULT_GAP_CLEANING_THRESHOLD}). * * @param gapCleaningThreshold an {@code int} specifying the threshold of number of gaps in a token before an * attempt to clean gaps up is taken * @return the current Builder instance, for fluent interfacing */ public Builder gapCleaningThreshold(int gapCleaningThreshold) { assertPositive(gapCleaningThreshold, "gapCleaningThreshold"); this.gapCleaningThreshold = gapCleaningThreshold; return this; }
/** * Sets the amount of time until a 'gap' in a TrackingToken may be considered timed out. This setting will * affect the cleaning process of gaps. Gaps that have timed out will be removed from Tracking Tokens to improve * performance of reading events. Defaults to an integer of {@code 60000} * ({@link JdbcEventStorageEngine#DEFAULT_GAP_TIMEOUT}), thus 1 minute. * * @param gapTimeout an {@code int} specifying the amount of time until a 'gap' in a TrackingToken may be * considered timed out * @return the current Builder instance, for fluent interfacing */ public Builder gapTimeout(int gapTimeout) { assertPositive(gapTimeout, "gapTimeout"); this.gapTimeout = gapTimeout; return this; }
/** * Sets the {@code maxGapOffset} specifying the maximum distance in sequence numbers between a missing event and * the event with the highest known index. If the gap is bigger it is assumed that the missing event will not be * committed to the store anymore. This event storage engine will no longer look for those events the next time * a batch is fetched. Defaults to an integer of {@code 10000} * ({@link JdbcEventStorageEngine#DEFAULT_MAX_GAP_OFFSET}. * * @param maxGapOffset an {@code int} specifying the maximum distance in sequence numbers between a missing * event and the event with the highest known index * @return the current Builder instance, for fluent interfacing */ public Builder maxGapOffset(int maxGapOffset) { assertPositive(maxGapOffset, "maxGapOffset"); this.maxGapOffset = maxGapOffset; return this; }
/** * Sets the threshold of number of gaps in a token before an attempt to clean gaps up is taken. Defaults to an * integer of {@code 250} ({@link JdbcEventStorageEngine#DEFAULT_GAP_CLEANING_THRESHOLD}). * * @param gapCleaningThreshold an {@code int} specifying the threshold of number of gaps in a token before an * attempt to clean gaps up is taken * @return the current Builder instance, for fluent interfacing */ public Builder gapCleaningThreshold(int gapCleaningThreshold) { assertPositive(gapCleaningThreshold, "gapCleaningThreshold"); this.gapCleaningThreshold = gapCleaningThreshold; return this; }