本文整理汇总了Java中org.apache.cassandra.locator.AbstractReplicationStrategy.createReplicationStrategy方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractReplicationStrategy.createReplicationStrategy方法的具体用法?Java AbstractReplicationStrategy.createReplicationStrategy怎么用?Java AbstractReplicationStrategy.createReplicationStrategy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.locator.AbstractReplicationStrategy
的用法示例。
在下文中一共展示了AbstractReplicationStrategy.createReplicationStrategy方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createReplicationStrategy
import org.apache.cassandra.locator.AbstractReplicationStrategy; //导入方法依赖的package包/类
public void createReplicationStrategy(KSMetaData ksm)
{
replicationStrategy = AbstractReplicationStrategy.createReplicationStrategy(ksm.name,
ksm.strategyClass,
StorageService.instance.getTokenMetadata(),
DatabaseDescriptor.getEndpointSnitch(),
ksm.strategyOptions);
}
示例2: getStrategy
import org.apache.cassandra.locator.AbstractReplicationStrategy; //导入方法依赖的package包/类
private AbstractReplicationStrategy getStrategy(String keyspaceName, TokenMetadata tmd)
{
KSMetaData ksmd = Schema.instance.getKSMetaData(keyspaceName);
return AbstractReplicationStrategy.createReplicationStrategy(
keyspaceName,
ksmd.strategyClass,
tmd,
new SimpleSnitch(),
ksmd.strategyOptions);
}
示例3: createReplicationStrategy
import org.apache.cassandra.locator.AbstractReplicationStrategy; //导入方法依赖的package包/类
public void createReplicationStrategy(KSMetaData ksm)
{
if (replicationStrategy != null)
StorageService.instance.getTokenMetadata().unregister(replicationStrategy);
replicationStrategy = AbstractReplicationStrategy.createReplicationStrategy(ksm.name,
ksm.strategyClass,
StorageService.instance.getTokenMetadata(),
DatabaseDescriptor.getEndpointSnitch(),
ksm.strategyOptions);
}
示例4: getStrategy
import org.apache.cassandra.locator.AbstractReplicationStrategy; //导入方法依赖的package包/类
private AbstractReplicationStrategy getStrategy(String keyspaceName, TokenMetadata tmd) throws ConfigurationException
{
KSMetaData ksmd = Schema.instance.getKSMetaData(keyspaceName);
return AbstractReplicationStrategy.createReplicationStrategy(
keyspaceName,
ksmd.strategyClass,
tmd,
new SimpleSnitch(),
ksmd.strategyOptions);
}
示例5: createReplicationStrategy
import org.apache.cassandra.locator.AbstractReplicationStrategy; //导入方法依赖的package包/类
private void createReplicationStrategy(KeyspaceMetadata ksm)
{
replicationStrategy = AbstractReplicationStrategy.createReplicationStrategy(ksm.name,
ksm.params.replication.klass,
StorageService.instance.getTokenMetadata(),
DatabaseDescriptor.getEndpointSnitch(),
ksm.params.replication.options);
}
示例6: getStrategy
import org.apache.cassandra.locator.AbstractReplicationStrategy; //导入方法依赖的package包/类
private AbstractReplicationStrategy getStrategy(String keyspaceName, TokenMetadata tmd)
{
KeyspaceMetadata ksmd = Schema.instance.getKSMetaData(keyspaceName);
return AbstractReplicationStrategy.createReplicationStrategy(
keyspaceName,
ksmd.params.replication.klass,
tmd,
new SimpleSnitch(),
ksmd.params.replication.options);
}
示例7: getStrategy
import org.apache.cassandra.locator.AbstractReplicationStrategy; //导入方法依赖的package包/类
private AbstractReplicationStrategy getStrategy(String table, TokenMetadata tmd) throws ConfigurationException
{
KSMetaData ksmd = Schema.instance.getKSMetaData(table);
return AbstractReplicationStrategy.createReplicationStrategy(
table,
ksmd.strategyClass,
tmd,
new SimpleSnitch(),
ksmd.strategyOptions);
}