Examples of PaasConnection


Examples of com.netflix.staash.connection.PaasConnection

        {   
            dbConfig.putString("strategy", strategy);
            dbConfig.putString("rf", rf);
        }
        if (storageConfig == null) throw new StorageDoesNotExistException();
        PaasConnection conn = cfactory.createConnection(storageConfig, schema);
        try {
            if (storageConfig.getString("type").equals("mysql"))
                conn.createDB(dbConfig.getString("name"));
            else
             conn.createDB(dbConfig.toString());
        } catch (Exception e) {
            // TODO: handle exception
        }
        try {
            conn.createTable(obj);
            if (index_row_keys!=null && index_row_keys.equals("true")) {
                JsonObject idxObj = new JsonObject();
                idxObj.putString("db", schema);
                idxObj.putString("name", obj.getString("name")+"ROWKEYS");
                idxObj.putString("columns", "key,column1,value");
                idxObj.putString("primarykey", "key,column1");
                conn.createTable(idxObj);
                //conn.createRowIndexTable(obj)
            }
        } catch (Exception e) {
            // TODO: handle exception
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.