Class CreateIndexesOperation

  • All Implemented Interfaces:
    >, >

    public class CreateIndexesOperation
    extends 
    implements >, >
    Deprecated.
    An operation that creates one or more indexes.

    Multiple index creation is supported starting with MongoDB server version 2.6

    Since:
    3.0
    MongoDB documentation
    • Constructor Detail

      • CreateIndexesOperation

        public CreateIndexesOperation​(MongoNamespace namespace,
                                      <IndexRequest> requests,
                                      WriteConcern writeConcern)
        Deprecated.
        Construct a new instance.
        Parameters:
        namespace - the database and collection namespace for the operation.
        requests - the index request
        writeConcern - the write concern
        Since:
        3.4
    • Method Detail

      • getWriteConcern

        public WriteConcern getWriteConcern()
        Deprecated.
        Gets the write concern.
        Returns:
        the write concern, which may be null
        Since:
        3.4
      • getRequests

        public <IndexRequest> getRequests()
        Deprecated.
        Gets the index requests.
        Returns:
        the index requests
      • getIndexNames

        public <> getIndexNames()
        Deprecated.
        Gets the index names.
        Returns:
        a list of index names
      • getMaxTime

        public long getMaxTime​( timeUnit)
        Deprecated.
        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
        Since:
        3.6
      • maxTime

        public CreateIndexesOperation maxTime​(long maxTime,
                                               timeUnit)
        Deprecated.
        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
        Since:
        3.6
      • execute

        public  execute​(WriteBinding binding)
        Deprecated.
        Description copied from interface: WriteOperation
        General execute which can return anything of type T
        Specified by:
        >
        Parameters:
        binding - the binding to execute in the context of
        Returns:
        T, the result of the execution
      • executeAsync

        public void executeAsync​(AsyncWriteBinding binding,
                                 > callback)
        Deprecated.
        Description copied from interface: AsyncWriteOperation
        General execute which can return anything of type T
        Specified by:
        >
        Parameters:
        binding - the binding to execute in the context of
        callback - the callback to be called when the operation has been executed