Codota Logo
Duration.ofDays
Code IndexAdd Codota to your IDE (free)

How to use
ofDays
method
in
org.threeten.bp.Duration

Best Java code snippets using org.threeten.bp.Duration.ofDays (Showing top 2 results out of 315)

  • Common ways to obtain Duration
private void myMethod () {
Duration d =
  • Codota IconDuration.ofSeconds(long1)
  • Codota IconDuration.ofMillis(long1)
  • Smart code suggestions by Codota
}
origin: googleapis/google-cloud-java

@Test
public void testReadRowsSettings() {
 ServerStreamingCallSettings.Builder<ReadRowsRequest, ReadRowsResponse> builder =
   EnhancedBigQueryStorageStubSettings.newBuilder().readRowsSettings();
 assertThat(builder.getRetryableCodes()).containsAllOf(Code.DEADLINE_EXCEEDED, Code.UNAVAILABLE);
 RetrySettings retrySettings = builder.getRetrySettings();
 assertThat(retrySettings.getInitialRetryDelay()).isEqualTo(Duration.ofMillis(100L));
 assertThat(retrySettings.getRetryDelayMultiplier()).isWithin(1e-6).of(1.3);
 assertThat(retrySettings.getMaxRetryDelay()).isEqualTo(Duration.ofMinutes(1L));
 assertThat(retrySettings.getInitialRpcTimeout()).isEqualTo(Duration.ofDays(1L));
 assertThat(retrySettings.getRpcTimeoutMultiplier()).isWithin(1e-6).of(1.0);
 assertThat(retrySettings.getMaxRpcTimeout()).isEqualTo(Duration.ofDays(1L));
 assertThat(retrySettings.getTotalTimeout()).isEqualTo(Duration.ofDays(1L));
 assertThat(builder.getIdleTimeout()).isEqualTo(Duration.ZERO);
}
origin: spotify/flo

@Override
public StagingTableId provide(EvalContext evalContext) {
 final String location = getDatasetOrThrow().getLocation();
 final TableId stagingTableId = bigQuery().createStagingTableId(tableId, location);
 final DatasetId stagingDatasetId = DatasetId.of(stagingTableId.getProject(), stagingTableId.getDataset());
 if (bigQuery().getDataset(stagingDatasetId) == null) {
  bigQuery().create(DatasetInfo
    .newBuilder(stagingDatasetId)
    .setLocation(location)
    .setDefaultTableLifetime(Duration.ofDays(1).toMillis())
    .build());
  LOG.info("created staging dataset: {}", stagingDatasetId);
 }
 return StagingTableId.of(this, stagingTableId);
}
org.threeten.bpDurationofDays

Javadoc

Obtains an instance of Duration from a number of standard 24 hour days.

The seconds are calculated based on the standard definition of a day, where each day is 86400 seconds which implies a 24 hour day. The nanosecond in second field is set to zero.

Popular methods of Duration

  • ofMillis
    Obtains an instance of Duration from a number of milliseconds. The seconds and nanoseconds are extra
  • ofSeconds
    Obtains an instance of Duration from a number of seconds and an adjustment in nanoseconds. This meth
  • toMillis
    Converts this duration to the total length in milliseconds. If this duration is too large to fit in
  • ofMinutes
    Obtains an instance of Duration from a number of standard length minutes. The seconds are calculated
  • compareTo
    Compares this duration to the specified Duration. The comparison is based on the total length of the
  • getSeconds
    Gets the number of seconds in this duration. The length of the duration is stored using two fields -
  • isZero
    Checks if this duration is zero length. A Duration represents a directed distance between two points
  • between
    Obtains an instance of Duration representing the duration between two instants. Obtains a Duration
  • getNano
    Gets the number of nanoseconds within the second in this duration. The length of the duration is sto
  • isNegative
    Checks if this duration is negative, excluding zero. A Duration represents a directed distance betwe
  • toNanos
    Converts this duration to the total length in nanoseconds expressed as a long. If this duration is
  • ofHours
    Obtains an instance of Duration from a number of standard length hours. The seconds are calculated b
  • toNanos,
  • ofHours,
  • ofNanos,
  • equals,
  • of,
  • plus,
  • toMinutes,
  • <init>,
  • create

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSharedPreferences (Context)
  • setContentView (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Collectors (java.util.stream)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now