Package com.eclipsesource.json

Examples of com.eclipsesource.json.JsonObject$Member


        root.add("result", result);
    }

    @Override
    public JsonObject toJson() {
        JsonObject root = new JsonObject();
        root.add("mapName", mapName);
        root.add("type", type);
        root.add("key", key);
        return root;
    }
View Full Code Here


    public void writeResponse(ManagementCenterService mcs, JsonObject root) throws Exception {
        Runtime runtime = Runtime.getRuntime();
        RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
        InternalPartitionService partitionService = mcs.getHazelcastInstance().node.getPartitionService();

        JsonObject properties = new JsonObject();
        properties.add("hazelcast.cl_version", mcs.getHazelcastInstance().node.getBuildInfo().getVersion());
        properties.add("date.cl_startTime", Long.toString(runtimeMxBean.getStartTime()));
        properties.add("seconds.cl_upTime", Long.toString(runtimeMxBean.getUptime()));
        properties.add("memory.cl_freeMemory", Long.toString(runtime.freeMemory()));
        properties.add("memory.cl_totalMemory", Long.toString(runtime.totalMemory()));
        properties.add("memory.cl_maxMemory", Long.toString(runtime.maxMemory()));
        properties.add("return.hasOngoingMigration", Boolean.toString(partitionService.hasOnGoingMigration()));
        properties.add("data.cl_migrationTasksCount", Long.toString(partitionService.getMigrationQueueSize()));
        root.add("result", properties);
    }
View Full Code Here

        root.add("result", properties);
    }

    @Override
    public JsonObject toJson() {
        return new JsonObject();
    }
View Full Code Here

        this.eventQueueSize = eventQueueSize;
    }

    @Override
    public JsonObject toJson() {
        final JsonObject root = new JsonObject();
        root.add("eventThreadCount", eventThreadCount);
        root.add("eventQueueCapacity", eventQueueCapacity);
        root.add("eventQueueSize", eventQueueSize);
        return root;
    }
View Full Code Here

        this.connectionCount = connectionCount;
    }

    @Override
    public JsonObject toJson() {
        final JsonObject root = new JsonObject();
        root.add("clientConnectionCount", clientConnectionCount);
        root.add("activeConnectionCount", activeConnectionCount);
        root.add("connectionCount", connectionCount);
        return root;
    }
View Full Code Here

    public MapConfigAdapter(MapConfig mapConfig) {
        this.config = mapConfig;
    }

    public JsonObject toJson() {
        JsonObject root = new JsonObject();
        root.add("name", config.getName());
        root.add("memoryFormat", config.getInMemoryFormat().toString());
        root.add("backupCount", config.getBackupCount());
        root.add("asyncBackupCount", config.getAsyncBackupCount());
        root.add("evictionPercentage", config.getEvictionPercentage());
        root.add("minEvictionCheckMillis", config.getMinEvictionCheckMillis());
        root.add("ttl", config.getTimeToLiveSeconds());
        root.add("maxIdle", config.getMaxIdleSeconds());
        root.add("maxSize", config.getMaxSizeConfig().getSize());
        root.add("maxSizePolicy", config.getMaxSizeConfig().getMaxSizePolicy().toString());
        root.add("readBackupData", config.isReadBackupData());
        root.add("evictionPolicy", config.getEvictionPolicy().name());
        root.add("mergePolicy", config.getMergePolicy());
        return root;
    }
View Full Code Here

        this.completedTaskCount = completedTaskCount;
    }

    @Override
    public JsonObject toJson() {
        final JsonObject root = new JsonObject();
        root.add("name", name);
        root.add("queueSize", queueSize);
        root.add("poolSize", poolSize);
        root.add("remainingQueueCapacity", remainingQueueCapacity);
        root.add("maximumPoolSize", maximumPoolSize);
        root.add("isTerminated", isTerminated);
        root.add("completedTaskCount", completedTaskCount);
        return root;
    }
View Full Code Here

        managedExecutorBeans.put(name, bean);
    }

    @Override
    public JsonObject toJson() {
        final JsonObject root = new JsonObject();
        JsonObject managedExecutors = new JsonObject();
        for (Map.Entry<String, SerializableManagedExecutorBean> entry : managedExecutorBeans.entrySet()) {
            managedExecutors.add(entry.getKey(), entry.getValue().toJson());
        }
        root.add("managedExecutorBeans", managedExecutors);
        root.add("eventServiceBean", eventServiceBean.toJson());
        root.add("operationServiceBean", operationServiceBean.toJson());
        root.add("connectionManagerBean", connectionManagerBean.toJson());
View Full Code Here

            try {
                HttpURLConnection connection = openConnection(url);
                OutputStream outputStream = connection.getOutputStream();
                final OutputStreamWriter writer = new OutputStreamWriter(outputStream, "UTF-8");
                try {
                    JsonObject root = new JsonObject();
                    root.add("identifier", identifier.toJson());
                    TimedMemberState timedMemberState = timedMemberStateFactory.createTimedMemberState();
                    root.add("timedMemberState", timedMemberState.toJson());
                    root.writeTo(writer);
                    writer.flush();
                    outputStream.flush();
                    post(connection);
                    if (manCenterConnectionLost) {
                        logger.info("Connection to management center restored.");
View Full Code Here

            InputStream inputStream = null;
            InputStreamReader reader = null;
            try {
                inputStream = openTaskInputStream();
                reader = new InputStreamReader(inputStream, "UTF-8");
                JsonObject request = JsonValue.readFrom(reader).asObject();
                if (!request.isEmpty()) {
                    JsonObject innerRequest = getObject(request, "request");
                    final int type = getInt(innerRequest, "type");
                    final int taskId = getInt(request, "taskId");

                    Class<? extends ConsoleRequest> requestClass = consoleRequests.get(type);
                    if (requestClass == null) {
View Full Code Here

TOP

Related Classes of com.eclipsesource.json.JsonObject$Member

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.