
org.apache.cassandra.repair.RepairParallelism Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cassandra-all Show documentation
Show all versions of cassandra-all Show documentation
The Apache Cassandra Project develops a highly scalable second-generation distributed database, bringing together Dynamo's fully distributed design and Bigtable's ColumnFamily-based data model.
package org.apache.cassandra.repair;
/**
* Specify the degree of parallelism when calculating the merkle trees in a repair job.
*/
public enum RepairParallelism
{
/**
* One node at a time
*/
SEQUENTIAL("sequential"),
/**
* All nodes at the same time
*/
PARALLEL("parallel"),
/**
* One node per data center at a time
*/
DATACENTER_AWARE("dc_parallel");
private final String name;
/**
* Return RepairParallelism that match given name.
* If name is null, or does not match any, this returns default "sequential" parallelism,
*
* @param name name of repair parallelism
* @return RepairParallelism that match given name
*/
public static RepairParallelism fromName(String name)
{
if (PARALLEL.getName().equals(name))
return PARALLEL;
else if (DATACENTER_AWARE.getName().equals(name))
return DATACENTER_AWARE;
else
return SEQUENTIAL;
}
private RepairParallelism(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
@Override
public String toString()
{
return getName();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy