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

com.azure.cosmos.implementation.throughputControl.controller.container.EmptyThroughputContainerController Maven / Gradle / Ivy

Go to download

This Package contains Microsoft Azure Cosmos SDK (with Reactive Extension Reactor support) for Azure Cosmos DB SQL API

There is a newer version: 4.61.1
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.cosmos.implementation.throughputControl.controller.container;

import com.azure.cosmos.implementation.RxDocumentServiceRequest;
import reactor.core.publisher.Mono;

/**
 * This is a dummy throughput container controller, which will just let the requests pass by.
 * This will be created when there is no throughput control group defined for the container.
 */
public class EmptyThroughputContainerController implements IThroughputContainerController {
    @Override
    public boolean canHandleRequest(RxDocumentServiceRequest request) {
        return true;
    }

    @Override
    @SuppressWarnings("unchecked")
    public  Mono init() {
        return (Mono) Mono.just(this);
    }

    @Override
    public  Mono processRequest(RxDocumentServiceRequest request, Mono nextRequestMono) {
        return nextRequestMono;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy