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

org.apache.pulsar.common.policies.data.HierarchyTopicPolicies Maven / Gradle / Ivy

/*
 * 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.pulsar.common.policies.data;

import org.apache.pulsar.shade.com.google.common.collect.ImmutableMap;
import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import lombok.Getter;
import org.apache.pulsar.common.api.proto.CommandSubscribe.SubType;
import org.apache.pulsar.common.policies.data.BacklogQuota.BacklogQuotaType;
import org.apache.pulsar.common.policies.data.impl.DispatchRateImpl;

/**
 * Topic policy hierarchy value container.
 */
@Getter
public class HierarchyTopicPolicies {
    final PolicyHierarchyValue> replicationClusters;
    final PolicyHierarchyValue retentionPolicies;
    final PolicyHierarchyValue deduplicationEnabled;
    final PolicyHierarchyValue deduplicationSnapshotIntervalSeconds;
    final PolicyHierarchyValue inactiveTopicPolicies;
    final PolicyHierarchyValue> subscriptionTypesEnabled;
    final PolicyHierarchyValue maxSubscriptionsPerTopic;
    final PolicyHierarchyValue maxUnackedMessagesOnConsumer;
    final PolicyHierarchyValue maxUnackedMessagesOnSubscription;
    final PolicyHierarchyValue maxProducersPerTopic;
    final Map> backLogQuotaMap;
    final PolicyHierarchyValue topicMaxMessageSize;
    final PolicyHierarchyValue messageTTLInSeconds;
    final PolicyHierarchyValue compactionThreshold;
    final PolicyHierarchyValue maxConsumerPerTopic;
    final PolicyHierarchyValue publishRate;
    final PolicyHierarchyValue delayedDeliveryEnabled;
    final PolicyHierarchyValue delayedDeliveryTickTimeMillis;
    final PolicyHierarchyValue replicatorDispatchRate;
    final PolicyHierarchyValue maxConsumersPerSubscription;
    final PolicyHierarchyValue subscribeRate;
    final PolicyHierarchyValue subscriptionDispatchRate;
    final PolicyHierarchyValue schemaCompatibilityStrategy;
    final PolicyHierarchyValue dispatchRate;

    final PolicyHierarchyValue schemaValidationEnforced;
    final PolicyHierarchyValue entryFilters;

    public HierarchyTopicPolicies() {
        replicationClusters = new PolicyHierarchyValue<>();
        retentionPolicies = new PolicyHierarchyValue<>();
        deduplicationEnabled = new PolicyHierarchyValue<>();
        deduplicationSnapshotIntervalSeconds = new PolicyHierarchyValue<>();
        inactiveTopicPolicies = new PolicyHierarchyValue<>();
        subscriptionTypesEnabled = new PolicyHierarchyValue<>();
        maxSubscriptionsPerTopic = new PolicyHierarchyValue<>();
        maxUnackedMessagesOnConsumer = new PolicyHierarchyValue<>();
        maxUnackedMessagesOnSubscription = new PolicyHierarchyValue<>();
        maxProducersPerTopic = new PolicyHierarchyValue<>();
        maxConsumerPerTopic = new PolicyHierarchyValue<>();
        maxConsumersPerSubscription = new PolicyHierarchyValue<>();
        backLogQuotaMap = new ImmutableMap.Builder>()
                .put(BacklogQuotaType.destination_storage, new PolicyHierarchyValue<>())
                .put(BacklogQuotaType.message_age, new PolicyHierarchyValue<>())
                .build();
        topicMaxMessageSize = new PolicyHierarchyValue<>();
        messageTTLInSeconds = new PolicyHierarchyValue<>();
        publishRate = new PolicyHierarchyValue<>();
        delayedDeliveryEnabled = new PolicyHierarchyValue<>();
        delayedDeliveryTickTimeMillis = new PolicyHierarchyValue<>();
        replicatorDispatchRate = new PolicyHierarchyValue<>();
        compactionThreshold = new PolicyHierarchyValue<>();
        subscribeRate = new PolicyHierarchyValue<>();
        subscriptionDispatchRate = new PolicyHierarchyValue<>();
        schemaCompatibilityStrategy = new PolicyHierarchyValue<>();
        dispatchRate = new PolicyHierarchyValue<>();
        schemaValidationEnforced = new PolicyHierarchyValue<>();
        entryFilters = new PolicyHierarchyValue<>();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy