listBulkInsertTasks()
A MilvusClient interface. This method lists bulk insert tasks.
R<ListImportTasksResponse> listBulkInsertTasks(ListBulkInsertTasksParam requestParam);
ListBulkInsertTasksParam
Use the ListBulkInsertTasksParam.Builder to construct a ListBulkInsertTasksParam object.
import io.milvus.param.ListBulkInsertTasksParam;
ListBulkInsertTasksParam.Builder builder = ListBulkInsertTasksParam.newBuilder();
Methods of ListBulkInsertTasksParam.Builder:
Method  | 
        Description  | 
        Parameters  | 
    
|---|---|---|
withCollectionName(String collectionName)  | 
        Sets the target collection name, list all tasks if the name is empty.  | 
        collectionName: The name of the target collection.  | 
    
withDatabaseName(String databaseName)  | 
        Sets the database name. database name can be null for default database.  | 
        databaseName: The database name.  | 
    
withLimit(Integer limit)  | 
        Specify limit count of returned tasks, list all tasks if the value is 0.  | 
        limit: The limit value to control the numbe of tasks returned.  | 
    
build()  | 
        Constructs a GetBulkInsertStateParam object.  | 
        N/A  | 
    
The ListBulkInsertTasksParam.Builder.build() can throw the following exceptions:
- ParamException: error if the parameter is invalid.
 
Returns
This method catches all the exceptions and returns an R<ListImportTasksResponse> object.
The ListImportTasksResponse contains a list of GetImportStateResponse, which you can use GetBulkInsertStateWrapper to parse. Call the getTasksList() of ListImportTasksResponse to get all the tasks.
Example
import io.milvus.param.bulkinsert.*;
R<ListImportTasksResponse> response = milvusClient.listBulkInsertTasks(ListBulkInsertTasksParam.newBuilder()
            .withCollectionName(COLLECTION_NAME)
            .withLimit(10)
            .build());
if (response.getStatus() != R.Status.Success.getCode()) {
    System.out.println(response.getMessage());
}