package com.cube.replication;

import com.cube.cluster.ClusterNode;
import java.util.List;

/**
 * Strategy for determining which nodes should replicate data.
 */
public interface ReplicationStrategy {
    
    /**
     * Get the list of replica nodes for a given key.
     * 
     * @param key The key to replicate
     * @param replicationFactor Number of replicas
     * @param availableNodes All nodes in the cluster
     * @return List of nodes that should store this key
     */
    List<ClusterNode> getReplicaNodes(String key, int replicationFactor, List<ClusterNode> availableNodes);
    
    /**
     * Get the name of this replication strategy.
     */
    String getName();
}
