Arsnael commented on code in PR #1699: URL: https://github.com/apache/james-project/pull/1699#discussion_r1305084072
########## server/data/data-jmap-cassandra/src/main/java/org/apache/james/jmap/cassandra/upload/CassandraUploadUsageRepository.java: ########## @@ -0,0 +1,68 @@ +/**************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information * + * regarding copyright ownership. The ASF licenses this file * + * to you under the Apache License, Version 2.0 (the * + * "License"); you may not use this file except in compliance * + * with the License. You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, * + * software distributed under the License is distributed on an * + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * + * KIND, either express or implied. See the License for the * + * specific language governing permissions and limitations * + * under the License. * + ****************************************************************/ + +package org.apache.james.jmap.cassandra.upload; + +import java.util.Objects; + +import javax.inject.Inject; + +import org.apache.james.core.Username; +import org.apache.james.core.quota.QuotaComponent; +import org.apache.james.core.quota.QuotaSizeUsage; +import org.apache.james.core.quota.QuotaType; +import org.apache.james.jmap.api.upload.UploadUsageRepository; +import org.apache.james.mailbox.cassandra.quota.CassandraQuotaCurrentValueDao; +import org.reactivestreams.Publisher; + +import reactor.core.publisher.Mono; + +public class CassandraUploadUsageRepository implements UploadUsageRepository { + + private CassandraQuotaCurrentValueDao cassandraQuotaCurrentValueDao; + + @Inject + public CassandraUploadUsageRepository(CassandraQuotaCurrentValueDao cassandraQuotaCurrentValueDao) { + this.cassandraQuotaCurrentValueDao = cassandraQuotaCurrentValueDao; + } + + @Override + public Publisher<Void> increaseSpace(Username username, QuotaSizeUsage usage) { Review Comment: Yes not always respected (but should try best to do so) I think the rationale back in the day was well if somebody use something else than reactor, he could still do his own implem with his own reactive framework other than Reactor, as Publisher is quite generic... Think of James as a big toolbox trying to be flexible enough to let people customize it a bit the way they want it :) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
