Skip to content

Instantly share code, notes, and snippets.

Queue queue = QueueFactory.getQueue("macheQueue");
TaskOptions t = TaskOptions.Builder.withUrl("/_ah/datastore_admin/backup.create");
t.param("name", backupName);
for (String kind : kindsToExport) {
t.param("kind", kind);
}
t.param("filesystem", "gs");
t.param("gs_bucket_name", bucketName);
public class AccumulatingProfiler {
public class AccumulatingProfileStep implements Comparable<AccumulatingProfileStep>, Serializable {
private static final long serialVersionUID = 1L;
public String name;
public Long lastStartTime;
public Long accumulatedTime;
public AccumulatingProfileStep(String name) {
this.name = name;
this.lastStartTime = 0L;
@Cached
public class Case extends SnapshottableEntity implements MailfooDataModel<Date> {
private static final long serialVersionUID = 1L;
@Id
private Long caseId;
@Parent
private Key<Organization> orgKey;
private Key<Workflow> workflowKey;
List<Key<Case>> cachedCaseKeys = someFunctionToGetKeys();
Profiler p = AppstatsWrapperFilter.getProfiler();
// run the objectify test
p.start("objectify");
Map<Key<Case>, Case> results = DAO.getEntities(cachedCaseKeys);
p.end("objectify");
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
public class SomeImmutableEntity {
Key<SomeImmutableEntity> firstEntityInChain
}
@aleemstreak
aleemstreak / .block
Created February 3, 2017 09:41 — forked from mbostock/.block
Collapsible Tree
license: gpl-3.0