All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.src.config.topic-configuration.js Maven / Gradle / Ivy

There is a newer version: 1.105.0
Show newest version
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TopicClientConfiguration = void 0;
class TopicClientConfiguration {
    constructor(props) {
        this.loggerFactory = props.loggerFactory;
        this.transportStrategy = props.transportStrategy;
        this.throwOnErrors = props.throwOnErrors;
    }
    getLoggerFactory() {
        return this.loggerFactory;
    }
    getTransportStrategy() {
        return this.transportStrategy;
    }
    withTransportStrategy(transportStrategy) {
        return new TopicClientConfiguration({
            loggerFactory: this.loggerFactory,
            transportStrategy: transportStrategy,
            throwOnErrors: this.throwOnErrors,
        });
    }
    withNumConnections(numConnections) {
        return this.withTransportStrategy(this.getTransportStrategy().withGrpcConfig(this.getTransportStrategy()
            .getGrpcConfig()
            .withNumClients(numConnections)));
    }
    getThrowOnErrors() {
        return this.throwOnErrors;
    }
    withThrowOnErrors(throwOnErrors) {
        return new TopicClientConfiguration({
            loggerFactory: this.loggerFactory,
            transportStrategy: this.transportStrategy,
            throwOnErrors: throwOnErrors,
        });
    }
}
exports.TopicClientConfiguration = TopicClientConfiguration;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9waWMtY29uZmlndXJhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb25maWcvdG9waWMtY29uZmlndXJhdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFpRUEsTUFBYSx3QkFBd0I7SUFLbkMsWUFBWSxLQUE4QjtRQUN4QyxJQUFJLENBQUMsYUFBYSxHQUFHLEtBQUssQ0FBQyxhQUFhLENBQUM7UUFDekMsSUFBSSxDQUFDLGlCQUFpQixHQUFHLEtBQUssQ0FBQyxpQkFBaUIsQ0FBQztRQUNqRCxJQUFJLENBQUMsYUFBYSxHQUFHLEtBQUssQ0FBQ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C | Privacy Policy