本文整理汇总了Java中org.apache.cassandra.triggers.TriggerExecutor类的典型用法代码示例。如果您正苦于以下问题:Java TriggerExecutor类的具体用法?Java TriggerExecutor怎么用?Java TriggerExecutor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TriggerExecutor类属于org.apache.cassandra.triggers包,在下文中一共展示了TriggerExecutor类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: mutateWithTriggers
import org.apache.cassandra.triggers.TriggerExecutor; //导入依赖的package包/类
public static void mutateWithTriggers(Collection<? extends IMutation> mutations, ConsistencyLevel consistencyLevel, boolean mutateAtomically) throws WriteTimeoutException, UnavailableException,
OverloadedException, InvalidRequestException
{
Collection<RowMutation> tmutations = TriggerExecutor.instance.execute(mutations);
if (mutateAtomically || tmutations != null)
{
Collection<RowMutation> allMutations = (Collection<RowMutation>) mutations;
if (tmutations != null)
allMutations.addAll(tmutations);
StorageProxy.mutateAtomically(allMutations, consistencyLevel);
}
else
{
StorageProxy.mutate(mutations, consistencyLevel);
}
}
开发者ID:pgaref,项目名称:ACaZoo,代码行数:17,代码来源:StorageProxy.java
示例2: casInternal
import org.apache.cassandra.triggers.TriggerExecutor; //导入依赖的package包/类
static RowIterator casInternal(CQL3CasRequest request, QueryState state)
{
UUID ballot = UUIDGen.getTimeUUIDFromMicros(state.getTimestamp());
SinglePartitionReadCommand readCommand = request.readCommand(FBUtilities.nowInSeconds());
FilteredPartition current;
try (ReadOrderGroup orderGroup = readCommand.startOrderGroup(); PartitionIterator iter = readCommand.executeInternal(orderGroup))
{
current = FilteredPartition.create(PartitionIterators.getOnlyElement(iter, readCommand));
}
if (!request.appliesTo(current))
return current.rowIterator();
PartitionUpdate updates = request.makeUpdates(current);
updates = TriggerExecutor.instance.execute(updates);
Commit proposal = Commit.newProposal(ballot, updates);
proposal.makeMutation().apply();
return null;
}
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:22,代码来源:ModificationStatement.java
示例3: mutateWithTriggers
import org.apache.cassandra.triggers.TriggerExecutor; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static void mutateWithTriggers(Collection<? extends IMutation> mutations,
ConsistencyLevel consistencyLevel,
boolean mutateAtomically)
throws WriteTimeoutException, WriteFailureException, UnavailableException, OverloadedException, InvalidRequestException
{
Collection<Mutation> augmented = TriggerExecutor.instance.execute(mutations);
boolean updatesView = Keyspace.open(mutations.iterator().next().getKeyspaceName())
.viewManager
.updatesAffectView(mutations, true);
if (augmented != null)
mutateAtomically(augmented, consistencyLevel, updatesView);
else
{
if (mutateAtomically || updatesView)
mutateAtomically((Collection<Mutation>) mutations, consistencyLevel, updatesView);
else
mutate(mutations, consistencyLevel);
}
}
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:23,代码来源:StorageProxy.java
示例4: mutateWithTriggers
import org.apache.cassandra.triggers.TriggerExecutor; //导入依赖的package包/类
public static void mutateWithTriggers(Collection<? extends IMutation> mutations, ConsistencyLevel consistencyLevel, boolean mutateAtomically) throws WriteTimeoutException, UnavailableException,
OverloadedException, InvalidRequestException
{
Collection<Mutation> tmutations = TriggerExecutor.instance.execute(mutations);
if (mutateAtomically || tmutations != null)
{
Collection<Mutation> allMutations = (Collection<Mutation>) mutations;
if (tmutations != null)
allMutations.addAll(tmutations);
StorageProxy.mutateAtomically(allMutations, consistencyLevel);
}
else
{
StorageProxy.mutate(mutations, consistencyLevel);
}
}
开发者ID:mafernandez-stratio,项目名称:cassandra-cqlMod,代码行数:17,代码来源:StorageProxy.java
示例5: mutateWithTriggers
import org.apache.cassandra.triggers.TriggerExecutor; //导入依赖的package包/类
public static void mutateWithTriggers(Collection<? extends IMutation> mutations, ConsistencyLevel consistencyLevel, boolean mutateAtomically)
throws WriteTimeoutException, UnavailableException, OverloadedException, InvalidRequestException
{
Collection<Mutation> tmutations = TriggerExecutor.instance.execute(mutations);
if (mutateAtomically || tmutations != null)
{
Collection<Mutation> allMutations = new ArrayList<>((Collection<Mutation>) mutations);
if (tmutations != null)
allMutations.addAll(tmutations);
StorageProxy.mutateAtomically(allMutations, consistencyLevel);
}
else
{
StorageProxy.mutate(mutations, consistencyLevel);
}
}
开发者ID:rajath26,项目名称:cassandra-trunk,代码行数:17,代码来源:StorageProxy.java
示例6: validate
import org.apache.cassandra.triggers.TriggerExecutor; //导入依赖的package包/类
public void validate(ClientState state) throws RequestValidationException
{
ThriftValidation.validateColumnFamily(keyspace(), columnFamily());
try
{
TriggerExecutor.instance.loadTriggerInstance(triggerClass);
}
catch (Exception e)
{
throw new ConfigurationException(String.format("Trigger class '%s' doesn't exist", triggerClass));
}
}
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:13,代码来源:CreateTriggerStatement.java
示例7: mutateWithTriggers
import org.apache.cassandra.triggers.TriggerExecutor; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static void mutateWithTriggers(Collection<? extends IMutation> mutations,
ConsistencyLevel consistencyLevel,
boolean mutateAtomically)
throws WriteTimeoutException, UnavailableException, OverloadedException, InvalidRequestException
{
Collection<Mutation> augmented = TriggerExecutor.instance.execute(mutations);
if (augmented != null)
mutateAtomically(augmented, consistencyLevel);
else if (mutateAtomically)
mutateAtomically((Collection<Mutation>) mutations, consistencyLevel);
else
mutate(mutations, consistencyLevel);
}
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:16,代码来源:StorageProxy.java
示例8: validate
import org.apache.cassandra.triggers.TriggerExecutor; //导入依赖的package包/类
public void validate(ClientState state) throws RequestValidationException
{
CFMetaData cfm = ThriftValidation.validateColumnFamily(keyspace(), columnFamily());
if (cfm.isView())
throw new InvalidRequestException("Cannot CREATE TRIGGER against a materialized view");
try
{
TriggerExecutor.instance.loadTriggerInstance(triggerClass);
}
catch (Exception e)
{
throw new ConfigurationException(String.format("Trigger class '%s' doesn't exist", triggerClass));
}
}
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:16,代码来源:CreateTriggerStatement.java
示例9: reloadTriggerClasses
import org.apache.cassandra.triggers.TriggerExecutor; //导入依赖的package包/类
public void reloadTriggerClasses() { TriggerExecutor.instance.reloadClasses(); }
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:2,代码来源:StorageProxy.java
示例10: reloadTriggerClass
import org.apache.cassandra.triggers.TriggerExecutor; //导入依赖的package包/类
public void reloadTriggerClass() { TriggerExecutor.instance.reloadClasses(); }
开发者ID:pgaref,项目名称:ACaZoo,代码行数:2,代码来源:StorageProxy.java
注:本文中的org.apache.cassandra.triggers.TriggerExecutor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论