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

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

The newest version!
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CacheConfiguration = void 0;
class CacheConfiguration {
    constructor(props) {
        this.loggerFactory = props.loggerFactory;
        this.retryStrategy = props.retryStrategy;
        this.transportStrategy = props.transportStrategy;
        this.middlewares = props.middlewares;
        this.throwOnErrors = props.throwOnErrors;
        this.readConcern = props.readConcern;
        this.compression = props.compression;
    }
    getLoggerFactory() {
        return this.loggerFactory;
    }
    getRetryStrategy() {
        return this.retryStrategy;
    }
    withRetryStrategy(retryStrategy) {
        return new CacheConfiguration({
            loggerFactory: this.loggerFactory,
            retryStrategy: retryStrategy,
            transportStrategy: this.transportStrategy,
            middlewares: this.middlewares,
            throwOnErrors: this.throwOnErrors,
            readConcern: this.readConcern,
            compression: this.compression,
        });
    }
    getTransportStrategy() {
        return this.transportStrategy;
    }
    withTransportStrategy(transportStrategy) {
        return new CacheConfiguration({
            loggerFactory: this.loggerFactory,
            retryStrategy: this.retryStrategy,
            transportStrategy: transportStrategy,
            middlewares: this.middlewares,
            throwOnErrors: this.throwOnErrors,
            readConcern: this.readConcern,
            compression: this.compression,
        });
    }
    withNumConnections(numConnections) {
        return this.withTransportStrategy(this.getTransportStrategy().withGrpcConfig(this.getTransportStrategy()
            .getGrpcConfig()
            .withNumClients(numConnections)));
    }
    getMiddlewares() {
        return this.middlewares;
    }
    withMiddlewares(middlewares) {
        return new CacheConfiguration({
            loggerFactory: this.loggerFactory,
            retryStrategy: this.retryStrategy,
            transportStrategy: this.transportStrategy,
            middlewares: middlewares,
            throwOnErrors: this.throwOnErrors,
            readConcern: this.readConcern,
            compression: this.compression,
        });
    }
    addMiddleware(middleware) {
        return new CacheConfiguration({
            loggerFactory: this.loggerFactory,
            retryStrategy: this.retryStrategy,
            transportStrategy: this.transportStrategy,
            middlewares: [middleware, ...this.middlewares],
            throwOnErrors: this.throwOnErrors,
            readConcern: this.readConcern,
            compression: this.compression,
        });
    }
    withClientTimeoutMillis(clientTimeout) {
        return new CacheConfiguration({
            loggerFactory: this.loggerFactory,
            retryStrategy: this.retryStrategy,
            transportStrategy: this.transportStrategy.withClientTimeoutMillis(clientTimeout),
            middlewares: this.middlewares,
            throwOnErrors: this.throwOnErrors,
            readConcern: this.readConcern,
            compression: this.compression,
        });
    }
    getThrowOnErrors() {
        return this.throwOnErrors;
    }
    withThrowOnErrors(throwOnErrors) {
        return new CacheConfiguration({
            loggerFactory: this.loggerFactory,
            retryStrategy: this.retryStrategy,
            transportStrategy: this.transportStrategy,
            middlewares: this.middlewares,
            throwOnErrors: throwOnErrors,
            readConcern: this.readConcern,
            compression: this.compression,
        });
    }
    getReadConcern() {
        return this.readConcern;
    }
    withReadConcern(readConcern) {
        return new CacheConfiguration({
            loggerFactory: this.loggerFactory,
            retryStrategy: this.retryStrategy,
            transportStrategy: this.transportStrategy,
            middlewares: this.middlewares,
            throwOnErrors: this.throwOnErrors,
            readConcern: readConcern,
            compression: this.compression,
        });
    }
    getCompressionStrategy() {
        return this.compression;
    }
    withCompressionStrategy(compressionStrategy) {
        return new CacheConfiguration({
            loggerFactory: this.loggerFactory,
            retryStrategy: this.retryStrategy,
            transportStrategy: this.transportStrategy,
            middlewares: this.middlewares,
            throwOnErrors: this.throwOnErrors,
            readConcern: this.readConcern,
            compression: compressionStrategy,
        });
    }
    hasCompressionStrategy() {
        return this.compression !== undefined;
    }
}
exports.CacheConfiguration = CacheConfiguration;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb25maWcvY29uZmlndXJhdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUE0SkEsTUFBYSxrQkFBa0I7SUFTN0IsWUFBWSxLQUF5QjtRQUNuQyxJQUFJLEN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vbXByZXNzaW9uU3RyYXRlZ3koKTogQ29tcHJlc3Npb25TdHJhdGVneSB8IHVuZGVmaW5lZCB7XG4gICAgcmV0dXJuIHRoaXMuY29tcHJlc3Npb247XG4gIH1cblxuICB3aXRoQ29tcHJlc3Npb25TdHJhdGVneShcbiAgICBjb21wcmVzc2lvblN0cmF0ZWd5OiBDb21wcmVzc2lvblN0cmF0ZWd5XG4gICk6IENvbmZpZ3VyYXRpb24ge1xuICAgIHJldHVybiBuZXcgQ2FjaGVDb25maWd1cmF0aW9uKHtcbiAgICAgIGxvZ2dlckZhY3Rvcnk6IHRoaXMubG9nZ2VyRmFjdG9yeSxcbiAgICAgIHJldHJ5U3RyYXRlZ3k6IHRoaXMucmV0cnlTdHJhdGVneSxcbiAgICAgIHRyYW5zcG9ydFN0cmF0ZWd5OiB0aGlzLnRyYW5zcG9ydFN0cmF0ZWd5LFxuICAgICAgbWlkZGxld2FyZXM6IHRoaXMubWlkZGxld2FyZXMsXG4gICAgICB0aHJvd09uRXJyb3JzOiB0aGlzLnRocm93T25FcnJvcnMsXG4gICAgICByZWFkQ29uY2VybjogdGhpcy5yZWFkQ29uY2VybixcbiAgICAgIGNvbXByZXNzaW9uOiBjb21wcmVzc2lvblN0cmF0ZWd5LFxuICAgIH0pO1xuICB9XG5cbiAgaGFzQ29tcHJlc3Npb25TdHJhdGVneSgpOiBib29sZWFuIHtcbiAgICByZXR1cm4gdGhpcy5jb21wcmVzc2lvbiAhPT0gdW5kZWZpbmVkO1xuICB9XG59XG4iXX0=




© 2015 - 2024 Weber Informatics LLC | Privacy Policy