Examples of fromJson()


Examples of com.hazelcast.management.request.ConsoleRequest.fromJson()

                    Class<? extends ConsoleRequest> requestClass = consoleRequests.get(type);
                    if (requestClass == null) {
                        throw new RuntimeException("Failed to find a request for requestType:" + type);
                    }
                    ConsoleRequest task = requestClass.newInstance();
                    task.fromJson(getObject(innerRequest, "request"));
                    processTaskAndSendResponse(taskId, task);
                }

            } catch (Exception e) {
                logger.warning(e);
View Full Code Here

Examples of com.hazelcast.monitor.LocalCacheStats.fromJson()

            stats.fromJson(next.getValue().asObject());
            executorStats.put(next.getName(), stats);
        }
        for (JsonObject.Member next : getObject(json, "cacheStats", new JsonObject())) {
            LocalCacheStats stats = new LocalCacheStatsImpl();
            stats.fromJson(next.getValue().asObject());
            cacheStats.put(next.getName(), stats);
        }
        for (JsonObject.Member next : getObject(json, "runtimeProps")) {
            runtimeProps.put(next.getName(), next.getValue().asLong());
        }
View Full Code Here

Examples of com.hazelcast.monitor.TimedMemberState.fromJson()

        TimedMemberState state = timedMemberStateFactory.createTimedMemberState();
        JsonObject json = state.toJson();

        TimedMemberState deserialized = new TimedMemberState();
        deserialized.fromJson(json);

        assertNotNull(deserialized);
        assertEquals(state, deserialized);
    }
}
View Full Code Here

Examples of com.mossle.core.mapper.JsonMapper.fromJson()

        try {
            String content = httpHandler.readText(url, parameterMap);
            logger.info(content);

            JsonMapper jsonMapper = new JsonMapper();
            Map map = jsonMapper.fromJson(content, Map.class);
            logger.debug("{}", map);

            long userId = ((Number) map.get("userId")).longValue();

            List<String> authorities = (List<String>) map.get("authorities");
View Full Code Here

Examples of com.orientechnologies.orient.core.record.impl.ODocument.fromJSON()

    String json = "{ \"@class\": \"Account\", \"type\": \"Residence\", \"street\": \"Piazza di Spagna\"}";

    db.begin(TXTYPE.OPTIMISTIC);
    for (int g = 0; g < 1000; g++) {
      ODocument doc = new ODocument(db, "Account");
      doc.fromJSON(json);
      doc.field("nr", g);

      doc.save();
    }
    db.commit();
View Full Code Here

Examples of edu.brown.api.results.ResponseEntries.fromJSON()

                    String json_line = getPayload(control_line, parts);
                    JSONObject json_object;
                    if (debug.val) LOG.debug("Processing response dump");
                    try {
                        json_object = new JSONObject(json_line);
                        newEntries.fromJSON(json_object, catalog_db);
                    } catch (JSONException ex) {
                        LOG.error("Invalid response:\n" + json_line);
                        throw new RuntimeException(ex);
                    }
                    this.responseEntries.addAll(newEntries);
View Full Code Here

Examples of edu.brown.designer.partitioners.plan.PartitionPlan.fromJSON()

        assertFalse(json.isEmpty());
        JSONObject json_object = new JSONObject(json);
        assertNotNull(json_object);
       
        PartitionPlan clone = new PartitionPlan();
        clone.fromJSON(json_object, catalog_db);
        System.err.println(clone);
       
    }
}
View Full Code Here

Examples of edu.brown.mappings.ParameterMapping.fromJSON()

        assertNotNull(json_obj);
       
        // System.err.println(json_obj.toString(2));
       
        ParameterMapping clone = new ParameterMapping();
        clone.fromJSON(json_obj, catalog_db);
        this.examineCorrelation(clone);

        assertEquals(this.correlation.getStatement(), clone.getStatement());
        assertEquals(this.correlation.getStatementIndex(), clone.getStatementIndex());
        assertEquals(this.correlation.getStmtParameter(), clone.getStmtParameter());
View Full Code Here

Examples of edu.brown.mappings.ParameterMappingsSet.fromJSON()

        assertFalse(json_string.isEmpty());

        JSONObject json_object = new JSONObject(json_string);
        assertNotNull(json_object);
        ParameterMappingsSet clone = new ParameterMappingsSet();
        clone.fromJSON(json_object, catalog_db);
       
        // System.err.println(json_object.toString(2));
       
        assertEquals(this.pc.size(), clone.size());
        for (ParameterMapping c : this.pc) {
View Full Code Here

Examples of edu.brown.markov.MarkovGraph.fromJSON()

                                                                 id, catalog_proc.getName()));
                        JSONObject json_graph = null;
                        try {
                            json_graph = new JSONObject(Encoder.hexDecodeToString(json_procs.getString(proc_key)));
                            MarkovGraph markov = new MarkovGraph(catalog_proc);
                            markov.fromJSON(json_graph, catalog_db);
                            MarkovGraphsContainer.this.put(id, markov);
                            markov.buildCache();
                        } catch (Throwable ex) {
                            throw new RuntimeException("Failed to load MarkovGraph " + id + " for " + catalog_proc.getName(), ex);
                        }
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.