Package voldemort.tools.admin

Source Code of voldemort.tools.admin.AdminToolTestUtils

package voldemort.tools.admin;

import voldemort.store.StoreDefinition;
import voldemort.store.StoreDefinitionBuilder;

public class AdminToolTestUtils {

    // This function should only be used in test code path
    public static StoreDefinitionBuilder storeDefToBuilder(StoreDefinition sd) {
        StoreDefinitionBuilder sb = new StoreDefinitionBuilder();
        sb.setName(sd.getName())
          .setDescription(sd.getDescription())
          .setType(sd.getType())
          .setRoutingPolicy(sd.getRoutingPolicy())
          .setRoutingStrategyType(sd.getRoutingStrategyType())
          .setKeySerializer(sd.getKeySerializer())
          .setValueSerializer(sd.getKeySerializer())
          .setReplicationFactor(sd.getReplicationFactor())
          .setZoneReplicationFactor(sd.getZoneReplicationFactor())
          .setRequiredReads(sd.getRequiredReads())
          .setRequiredWrites(sd.getRequiredWrites())
          .setZoneCountReads(sd.getZoneCountReads())
          .setZoneCountWrites(sd.getZoneCountWrites());
        return sb;
    }
}
TOP

Related Classes of voldemort.tools.admin.AdminToolTestUtils

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.