Package com.google.appengine.tools.pipeline.impl.model

Examples of com.google.appengine.tools.pipeline.impl.model.FanoutTaskRecord.toEntity()


   * Tests conversion of {@link FanoutTaskRecord} to and from an {@link Entity}
   */
  public void testFanoutTaskRecord() throws Exception {
    Key rootJobKey = KeyFactory.createKey("dummy", "dummy");
    FanoutTaskRecord record = new FanoutTaskRecord(rootJobKey, encodedBytes);
    Entity entity = record.toEntity();
    // reconstitute entity
    record = new FanoutTaskRecord(entity);
    checkBytes(record.getPayload());
  }

View Full Code Here


          FanoutTaskRecord ftRecord = new FanoutTaskRecord(rootJobKey, encodedTasks);
          // Store FanoutTaskRecord outside of any transaction, but before
          // the FanoutTask is enqueued. If the put succeeds but the
          // enqueue fails then the FanoutTaskRecord is orphaned. But
          // the Pipeline is still consistent.
          dataStore.put(null, ftRecord.toEntity());
          FanoutTask fannoutTask = new FanoutTask(ftRecord.getKey(), queueSettings);
          taskQueue.enqueue(fannoutTask);
        }
      }
      transaction.commit();
View Full Code Here

          FanoutTaskRecord ftRecord = new FanoutTaskRecord(rootJobKey, encodedTasks);
          // Store FanoutTaskRecord outside of any transaction, but before
          // the FanoutTask is enqueued. If the put succeeds but the
          // enqueue fails then the FanoutTaskRecord is orphaned. But
          // the Pipeline is still consistent.
          dataStore.put(null, ftRecord.toEntity());
          FanoutTask fannoutTask = new FanoutTask(ftRecord.getKey());
          taskQueue.enqueue(fannoutTask);
        }
      }
      transaction.commit();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.