Package com.impetus.kundera.configure.ClientProperties

Examples of com.impetus.kundera.configure.ClientProperties.DataStore


        MongoOptions mo = null;
        MongoDBSchemaMetadata metadata = MongoDBPropertyReader.msmd;
        ClientProperties cp = metadata != null ? metadata.getClientProperties() : null;
        if (cp != null)
        {
            DataStore dataStore = metadata != null ? metadata.getDataStore() : null;
            List<Server> servers = dataStore != null && dataStore.getConnection() != null ? dataStore.getConnection()
                    .getServers() : null;
            if (servers != null && !servers.isEmpty())
            {
                for (Server server : servers)
                {
                    addrs.add(new ServerAddress(server.getHost().trim(), Integer.parseInt(server.getPort().trim())));
                }
                mongo = new Mongo(addrs);
            }
            else
            {
                logger.info("Connecting to mongodb at " + contactNode + " on port " + defaultPort);
                mongo = new Mongo(contactNode, Integer.parseInt(defaultPort));
            }
            mo = mongo.getMongoOptions();
            Properties p = dataStore != null && dataStore.getConnection() != null ? dataStore.getConnection()
                    .getProperties() : null;

            PopulateMongoOptions.populateMongoOptions(mo, p);
        }
        else
View Full Code Here


    private class ESSchemaMetadata extends AbstractSchemaMetadata
    {
       
        public Properties getConnectionProperties()
        {
            DataStore  ds = getDataStore("elasticsearch");
           
            if (ds != null)
            {
                Connection connection = ds.getConnection();
                if (connection != null)
                {
                    Properties properties = connection.getProperties();

                    return properties;
View Full Code Here

        // Create Batch inserter with configuration if specified
        Neo4JSchemaMetadata nsmd = Neo4JPropertyReader.nsmd;
        ClientProperties cp = nsmd != null ? nsmd.getClientProperties() : null;
        if (cp != null)
        {
            DataStore dataStore = nsmd != null ? nsmd.getDataStore() : null;
            Properties properties = dataStore != null && dataStore.getConnection() != null ? dataStore.getConnection()
                    .getProperties() : null;

            if (properties != null)
            {
                Map<String, String> config = new HashMap<String, String>((Map) properties);
View Full Code Here

            return false;
        }

        public boolean isInvertedIndexingEnabled(String schemaName)
        {
            DataStore dataStore = getDataStore(dataStoreName);
            boolean result = false;
            if (schemaName != null && dataStore != null && dataStore.getSchemas() != null)
            {
                for (Schema schema : dataStore.getSchemas())
                {
                    if (schema != null && schemaName.equals(schema.getName()) && schema.getSchemaProperties() != null
                            && schema.getSchemaProperties() != null)
                    {
                        result = Boolean.parseBoolean((String) schema.getSchemaProperties().get(
View Full Code Here

            return result;
        }

        public String getCqlVersion()
        {
            DataStore dataStore = getDataStore(dataStoreName);

            if (dataStore != null)
            {
                Properties properties = dataStore.getConnection() != null ? dataStore.getConnection().getProperties()
                        : null;

                if (properties != null)
                {
                    String cqlVersion = properties.getProperty(CassandraConstants.CQL_VERSION);
View Full Code Here

            return CassandraConstants.CQL_VERSION_2_0;
        }

        public Schema getSchema(String schemaName)
        {
            DataStore dataStore = getDataStore(dataStoreName);

            if (dataStore != null)
            {
                List<Schema> schemas = dataStore.getSchemas();
                if (schemas != null && !schemas.isEmpty())
                {
                    for (Schema s : schemas)
                    {
                        if (s != null && s.getName() != null && s.getName().equalsIgnoreCase(schemaName))
View Full Code Here

            return null;
        }

        public Properties getConnectionProperties()
        {
            DataStore ds = getDataStore(dataStoreName);
            Properties properties = new Properties();
            if (ds != null)
            {
                if (ds.getConnection() != null)
                {
                    properties = ds.getConnection().getProperties();
                    return properties != null ? properties : new Properties();
                }
                if (logger.isWarnEnabled())
                {
                    logger.warn("No connection properties found, returning none.");
View Full Code Here

            return properties;
        }

        public List<Server> getConnectionServers()
        {
            DataStore ds = getDataStore(dataStoreName);
            List<Server> servers = new ArrayList<Server>();
            if (ds != null && ds.getConnection() != null)
            {
                servers = ds.getConnection().getServers();
                return servers;
            }
            return servers;
        }
View Full Code Here

            return servers;
        }

        public Properties getDatastoreProperties()
        {
            DataStore ds = getDataStore(dataStoreName);
            Properties properties = new Properties();
            if (ds != null && ds.getProperties() != null)
            {
                properties.putAll(ds.getProperties());
            }
            return properties;
        }
View Full Code Here

        GraphDatabaseService graphDb = (GraphDatabaseService) getConnectionPoolOrConnection();

        if (cp != null && graphDb == null)
        {
            DataStore dataStore = nsmd != null ? nsmd.getDataStore() : null;

            Properties properties = dataStore != null && dataStore.getConnection() != null ? dataStore.getConnection()
                    .getProperties() : null;

            if (properties != null)
            {
                Map<String, String> config = new HashMap<String, String>((Map) properties);
View Full Code Here

TOP

Related Classes of com.impetus.kundera.configure.ClientProperties.DataStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.