com.azure.cosmos.implementation.throughputControl.controller.container.EmptyThroughputContainerController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-cosmos Show documentation
Show all versions of azure-cosmos Show documentation
This Package contains Microsoft Azure Cosmos SDK (with Reactive Extension Reactor support) for Azure Cosmos DB SQL API
// 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;
}
}