// Path: src/main/java/com/bazoud/elasticsearch/river/git/beans/Context.java
// @Data
// @SuppressWarnings("PMD.UnusedPrivateField")
// public class Context {
//     private String name;
//     private String uri;
//     private File projectPath;
//     private Repository repository;
//     private String workingDir =
//         System.getProperty("user.home") + File.separator + ".elasticsearch-river-git";
//     private Collection<Ref> refs;
//     private Client client;
//     private Optional<Pattern> issuePattern = Optional.absent();
//     private String issueRegex;
//     private boolean indexingDiff;
//     private long updateRate = TimeUnit.MILLISECONDS.convert(15, TimeUnit.MINUTES);
//     private String type = "git";
//     private String riverName;
//     private String riverIndexName;
// }
// 
// Path: src/main/java/com/bazoud/elasticsearch/river/git/beans/Id.java
// public interface Id {
//     String getId();
// }
// 
// Path: src/main/java/com/bazoud/elasticsearch/river/git/guava/Visitor.java
// public interface Visitor<T> {
//     void before();
// 
//     void visit(T input) throws Exception;
// 
//     void after();
// }


import org.elasticsearch.action.bulk.BulkRequestBuilder;
import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import com.bazoud.elasticsearch.river.git.beans.Context;
import com.bazoud.elasticsearch.river.git.beans.Id;
import com.bazoud.elasticsearch.river.git.guava.Visitor;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Throwables;
import static org.elasticsearch.client.Requests.indexRequest;
package com.bazoud.elasticsearch.river.git.flow.visitors;




/**
 * @author Olivier Bazoud
 */
public class BulkVisitor<T extends Id> implements Visitor<T> {
    private static ESLogger logger = Loggers.getLogger(BulkVisitor.class);

    private BulkRequestBuilder bulk;
// Path: src/main/java/com/bazoud/elasticsearch/river/git/beans/Context.java
// @Data
// @SuppressWarnings("PMD.UnusedPrivateField")
// public class Context {
//     private String name;
//     private String uri;
//     private File projectPath;
//     private Repository repository;
//     private String workingDir =
//         System.getProperty("user.home") + File.separator + ".elasticsearch-river-git";
//     private Collection<Ref> refs;
//     private Client client;
//     private Optional<Pattern> issuePattern = Optional.absent();
//     private String issueRegex;
//     private boolean indexingDiff;
//     private long updateRate = TimeUnit.MILLISECONDS.convert(15, TimeUnit.MINUTES);
//     private String type = "git";
//     private String riverName;
//     private String riverIndexName;
// }
// 
// Path: src/main/java/com/bazoud/elasticsearch/river/git/beans/Id.java
// public interface Id {
//     String getId();
// }
// 
// Path: src/main/java/com/bazoud/elasticsearch/river/git/guava/Visitor.java
// public interface Visitor<T> {
//     void before();
// 
//     void visit(T input) throws Exception;
// 
//     void after();
// }


// Path: src/main/java/com/bazoud/elasticsearch/river/git/flow/visitors/BulkVisitor.java
import org.elasticsearch.action.bulk.BulkRequestBuilder;
import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import com.bazoud.elasticsearch.river.git.beans.Context;
import com.bazoud.elasticsearch.river.git.beans.Id;
import com.bazoud.elasticsearch.river.git.guava.Visitor;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Throwables;
import static org.elasticsearch.client.Requests.indexRequest;

package com.bazoud.elasticsearch.river.git.flow.visitors;




/**
 * @author Olivier Bazoud
 */
public class BulkVisitor<T extends Id> implements Visitor<T> {
    private static ESLogger logger = Loggers.getLogger(BulkVisitor.class);

    private BulkRequestBuilder bulk;
    private Context context;