.transactionless().load().keys(keysToLoad); final Collection<CounterShardData> counterShardDatas = counterShardDatasMap.values(); for (CounterShardData counterShardData : counterShardDatas)
ObjectifyService.ofy().transactionless().delete().type(CounterShardOperationData.class) .parent(counterShardDataKey); ObjectifyService.ofy().transactionless().delete().keys(counterShardDataKeys).now(); ObjectifyService.ofy().transactionless().delete().key(counterData.getTypedKey()).now();
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; }