com.googlecode.objectify.Objectify.transactionless()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中com.googlecode.objectify.Objectify.transactionless()方法的一些代码示例,展示了Objectify.transactionless()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Objectify.transactionless()方法的具体详情如下:
包路径:com.googlecode.objectify.Objectify
类名称:Objectify
方法名:transactionless

Objectify.transactionless介绍

暂无

代码示例

代码示例来源:origin: instacount/appengine-counter

.transactionless().load().keys(keysToLoad);
final Collection<CounterShardData> counterShardDatas = counterShardDatasMap.values();
for (CounterShardData counterShardData : counterShardDatas)

代码示例来源:origin: instacount/appengine-counter

ObjectifyService.ofy().transactionless().delete().type(CounterShardOperationData.class)
    .parent(counterShardDataKey);
ObjectifyService.ofy().transactionless().delete().keys(counterShardDataKeys).now();
ObjectifyService.ofy().transactionless().delete().key(counterData.getTypedKey()).now();

代码示例来源:origin: com.threewks.thundr/thundr-gae

private JobStatus updateJob(String jobId, Status newStatus, boolean incrementAttempts) {
  if (jobId != null) {
    JobStatus jobStatus = ofy().load().type(JobStatus.class).id(jobId).now();
    if (jobStatus != null) {
      Status currentStatus = jobStatus.getStatus();
      jobStatus.updateStatus(newStatus);
      if (incrementAttempts) {
        jobStatus.incrementAttempts();
      }
      ofy().transactionless().save().entity(jobStatus).now();
      Logger.info("Job %s moved from %s to %s (%s attempts)", jobId, currentStatus, newStatus, jobStatus.getAttempts());
      return jobStatus;
    }
  }
  return null;
}

相关文章