Github user steveblackmon commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/348#discussion_r95085431
  
    --- Diff: 
streams-contrib/streams-persist-neo4j/src/main/java/org/apache/streams/neo4j/bolt/Neo4jBoltClient.java
 ---
    @@ -0,0 +1,100 @@
    +package org.apache.streams.neo4j.bolt;
    +
    +import org.apache.streams.neo4j.Neo4jConfiguration;
    +
    +import com.google.common.base.Preconditions;
    +
    +import org.apache.commons.lang3.StringUtils;
    +import org.neo4j.driver.v1.AuthToken;
    +import org.neo4j.driver.v1.AuthTokens;
    +import org.neo4j.driver.v1.Driver;
    +import org.neo4j.driver.v1.GraphDatabase;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import java.util.Map;
    +import java.util.concurrent.ConcurrentHashMap;
    +
    +public class Neo4jBoltClient {
    +
    +    private static final Logger LOGGER = LoggerFactory
    +            .getLogger(Neo4jBoltClient.class);
    +
    +    private Driver client;
    +
    +    public Neo4jConfiguration config;
    +
    +    private Neo4jBoltClient(Neo4jConfiguration neo4jConfiguration) {
    +        this.config = neo4jConfiguration;
    +        try {
    +            this.start();
    +        } catch (Exception e) {
    +            e.printStackTrace();
    +            this.client = null;
    +        }
    +    }
    +
    +    private static Map<Neo4jConfiguration, Neo4jBoltClient> INSTANCE_MAP = 
new ConcurrentHashMap<Neo4jConfiguration, Neo4jBoltClient>();
    +
    +    public static Neo4jBoltClient getInstance(Neo4jConfiguration 
neo4jConfiguration) {
    +        if (    INSTANCE_MAP != null &&
    --- End diff --
    
    ✔️ 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to