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

org.onosproject.store.primitives.PartitionService Maven / Gradle / Ivy

There is a newer version: 2.7.0
Show newest version
/*
 * Copyright 2016 Open Networking Laboratory
 *
 * Licensed 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.onosproject.store.primitives;

import java.util.Set;

import org.onosproject.cluster.NodeId;
import org.onosproject.cluster.PartitionId;
import org.onosproject.event.ListenerService;

/**
 * Service used for accessing information about storage partitions.
 */
public interface PartitionService extends ListenerService {

    /**
     * Returns the total number of partitions.
     *
     * @return number of partitions
     */
    int getNumberOfPartitions();

    /**
     * Returns the set of controller nodes configured to be members of a partition.
     *
     * @param partitionId partition identifier
     * @return set of node identifiers
     */
    Set getConfiguredMembers(PartitionId partitionId);

    /**
     * Returns the set of controller nodes that are the current active members of a partition.
     *
     * @param partitionId partition identifier
     * @return set of node identifiers
     */
    Set getActiveMembersMembers(PartitionId partitionId);

    /**
     * Returns the identifiers of all partitions.
     *
     * @return set of partition identifiers
     */
    Set getAllPartitionIds();

    /**
     * Returns a DistributedPrimitiveCreator that can create primitives hosted on a partition.
     *
     * @param partitionId partition identifier
     * @return distributed primitive creator
     */
    DistributedPrimitiveCreator getDistributedPrimitiveCreator(PartitionId partitionId);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy