private static ExponentialBackOff newBackOff() { return new ExponentialBackOff.Builder() .setInitialIntervalMillis(MIN_BACKOFF_MS) .setMaxIntervalMillis(MAX_BACKOFF_MS) .setMaxElapsedTimeMillis(Integer.MAX_VALUE) // Prevent Backoff.STOP from getting returned. .build(); }
/** * Returns the blob's data cache control. * * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2">Cache-Control</a> */ public String getCacheControl() { return Data.isNull(cacheControl) ? null : cacheControl; }
public ModifyAckDeadline(String ackId, long seconds) { Preconditions.checkNotNull(ackId); this.ackId = ackId; this.seconds = seconds; }
@Override public Builder setDefaultKmsKeyName(String defaultKmsKeyName) { this.defaultKmsKeyName = defaultKmsKeyName != null ? defaultKmsKeyName : Data.<String>nullOf(String.class); return this; }
public boolean isBackOff() { count++; if (count > lastBackOff) { try { lastBackOff = backOff.nextBackOffMillis(); } catch (IOException e) { // we don't care IOException here } return false; } else { return true; } }
/** A collection of notes that exist on a tasks/taskseries */ public class Notes { @Key("note") public List<String> notes; @Override public String toString() { return MoreObjects.toStringHelper(this).add("notes", notes).toString(); } }
/** * Returns the blob's data content type. * * @see <a href="https://tools.ietf.org/html/rfc2616#section-14.17">Content-Type</a> */ public String getContentType() { return Data.isNull(contentType) ? null : contentType; }
/** * Get the user-assigned name of the project. * * <p>This field is optional, can remain unset, and can be changed after project creation. */ public String getName() { return Data.isNull(name) ? null : name; }
public class Transaction { // The id of the transaction @Key("@id") public int id; // Whether this transaction is undoable or not. @Key("undoable") public int undoable; @Override public String toString() { return MoreObjects.toStringHelper(this).add("id", id).add("undoable", undoable).toString(); } }
/** * Returns the blob's data content encoding. * * @see <a href="https://tools.ietf.org/html/rfc7231#section-3.1.2.2">Content-Encoding</a> */ public String getContentEncoding() { return Data.isNull(contentEncoding) ? null : contentEncoding; }
/** * Returns the blob's data content disposition. * * @see <a href="https://tools.ietf.org/html/rfc6266">Content-Disposition</a> */ public String getContentDisposition() { return Data.isNull(contentDisposition) ? null : contentDisposition; }
/** * Returns the time when this table expires, in milliseconds since the epoch. If not present, the * table will persist indefinitely. Expired tables will be deleted and their storage reclaimed. */ public Long getExpirationTime() { return Data.isNull(expirationTime) ? null : expirationTime; }
/** * Returns the CRC32C checksum of blob's data as described in <a * href="http://tools.ietf.org/html/rfc4960#appendix-B">RFC 4960, Appendix B;</a> encoded in * base64 in big-endian order. * * @see <a href="https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI">Hashes and ETags: * Best Practices</a> */ public String getCrc32c() { return Data.isNull(crc32c) ? null : crc32c; }
/** * Returns the blob's data content language. * * @see <a href="http://tools.ietf.org/html/bcp47">Content-Language</a> */ public String getContentLanguage() { return Data.isNull(contentLanguage) ? null : contentLanguage; }
/** * Returns the MD5 hash of blob's data encoded in base64. * * @see <a href="https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI">Hashes and ETags: * Best Practices</a> */ public String getMd5() { return Data.isNull(md5) ? null : md5; }
/** Returns the field description. */ public String getDescription() { return Data.isNull(description) ? null : description; }
/** Returns a user-friendly description for the table. */ public String getDescription() { return Data.isNull(description) ? null : description; }