Search in sources :

Example 1 with ThreadDumpOperation

use of com.hazelcast.internal.management.operation.ThreadDumpOperation in project hazelcast by hazelcast.

the class ThreadDumpRequest method writeResponse.

@Override
public void writeResponse(ManagementCenterService mcs, JsonObject root) {
    final JsonObject result = new JsonObject();
    String threadDump = (String) mcs.callOnThis(new ThreadDumpOperation(dumpDeadlocks));
    if (threadDump != null) {
        result.add("hasDump", true);
        result.add("dump", threadDump);
    } else {
        result.add("hasDump", false);
    }
    root.add("result", result);
}
Also used : JsonObject(com.eclipsesource.json.JsonObject) ThreadDumpOperation(com.hazelcast.internal.management.operation.ThreadDumpOperation) JsonUtil.getString(com.hazelcast.util.JsonUtil.getString)

Aggregations

JsonObject (com.eclipsesource.json.JsonObject)1 ThreadDumpOperation (com.hazelcast.internal.management.operation.ThreadDumpOperation)1 JsonUtil.getString (com.hazelcast.util.JsonUtil.getString)1