/** * Create a new termination strategy that allows up to the specified number of seconds to have elapsed before terminating. * @param maxTimeInSeconds number of seconds * @return termination strategy */ public static MaxTimeTerminationStrategy ofSeconds(final long maxTimeInSeconds) { return ofTimeUnit(maxTimeInSeconds, TimeUnit.SECONDS); }
/** * Create a new termination strategy that allows up to the specified number of milliseconds to have elapsed before terminating. * @param maxTimeInMillis number of milliseconds * @return termination strategy */ public static MaxTimeTerminationStrategy ofMillis(final long maxTimeInMillis) { return ofTimeUnit(maxTimeInMillis, TimeUnit.MILLISECONDS); }
/** * Create a new termination strategy that allows up to the specified number of minutes to have elapsed before terminating. * @param maxTimeInMinutes number of minutes * @return termination strategy */ public static MaxTimeTerminationStrategy ofMinutes(final long maxTimeInMinutes) { return ofTimeUnit(maxTimeInMinutes, TimeUnit.MINUTES); } }