예제 #1
0
        public void LoadData(IEnumerable <Build> builds)
        {
            var waitHandle = new CountdownEvent(1);
            var bulkAll    = client.BulkAll(builds, b => b
                                            .Index <Build>()
                                            .BackOffRetries(2)
                                            .BackOffTime("30s")
                                            .MaxDegreeOfParallelism(4)
                                            .Size(1000)
                                            );

            bulkAll.Subscribe(new BulkAllObserver(
                                  onNext: (b) => { Console.Write("."); },
                                  onError: (e) => throw e,
                                  onCompleted: () => waitHandle.Signal()
                                  ));
        }