Class EstimatedDocumentCountOptions


  • public class EstimatedDocumentCountOptions
    extends java.lang.Object
    The options an estimated count operation.
    Since:
    3.8
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getMaxTime​(java.util.concurrent.TimeUnit timeUnit)
      Gets the maximum execution time on the server for this operation.
      EstimatedDocumentCountOptions maxTime​(long maxTime, java.util.concurrent.TimeUnit timeUnit)
      Sets the maximum execution time on the server for this operation.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • EstimatedDocumentCountOptions

        public EstimatedDocumentCountOptions()
    • Method Detail

      • getMaxTime

        public long getMaxTime​(java.util.concurrent.TimeUnit timeUnit)
        Gets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time.
        Parameters:
        timeUnit - the time unit to return the result in
        Returns:
        the maximum execution time in the given time unit
      • maxTime

        public EstimatedDocumentCountOptions maxTime​(long maxTime,
                                                     java.util.concurrent.TimeUnit timeUnit)
        Sets the maximum execution time on the server for this operation.
        Parameters:
        maxTime - the max time
        timeUnit - the time unit, which may not be null
        Returns:
        this
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object