Interface VirtualReplicatorCluster

  • All Superinterfaces:
    java.lang.AutoCloseable

    public interface VirtualReplicatorCluster
    extends java.lang.AutoCloseable
    The VirtualReplicatorCluster provides a high-level interface to Virtual Replicator Cluster. In Virtual Replicator Cluster, PartitionIds are resources and they are assigned to participant node.
    • Method Detail

      • getAllDataNodeIds

        java.util.List<? extends DataNodeId> getAllDataNodeIds()
        Gets all nodes in the cluster.
        Returns:
        list of PartitionId
      • getCurrentDataNodeId

        DataNodeId getCurrentDataNodeId()
        Gets DataNodeId representation of current node.
        Returns:
        DataNodeId.
      • participate

        void participate()
                  throws java.lang.Exception
        Join the cluster as a participant.
        Throws:
        java.lang.Exception
      • getAssignedPartitionIds

        java.util.Collection<? extends PartitionId> getAssignedPartitionIds()
        Gets all PartitionIds assigned to current node.
        Returns:
        Collection of PartitionId
      • isPartitionAssigned

        boolean isPartitionAssigned​(java.lang.String partitionPath)
        Check is a partition is assigned to current node.
        Parameters:
        partitionPath - partition id of the partition.
        Returns:
        true if partition is assigned to current node. false otherwise.