Search in sources :

Example 1 with Diagnostics

use of com.hazelcast.internal.diagnostics.Diagnostics in project hazelcast by hazelcast.

the class QueueStoreWrapper method instrument.

void instrument(NodeEngine nodeEngine) {
    Diagnostics diagnostics = ((NodeEngineImpl) nodeEngine).getDiagnostics();
    StoreLatencyPlugin storeLatencyPlugin = diagnostics.getPlugin(StoreLatencyPlugin.class);
    if (!enabled || storeLatencyPlugin == null) {
        return;
    }
    this.store = new LatencyTrackingQueueStore(store, storeLatencyPlugin, name);
}
Also used : NodeEngineImpl(com.hazelcast.spi.impl.NodeEngineImpl) Diagnostics(com.hazelcast.internal.diagnostics.Diagnostics) StoreLatencyPlugin(com.hazelcast.internal.diagnostics.StoreLatencyPlugin)

Example 2 with Diagnostics

use of com.hazelcast.internal.diagnostics.Diagnostics in project hazelcast by hazelcast.

the class HazelcastClientInstanceImpl method initDiagnostics.

private Diagnostics initDiagnostics(ClientConfig config) {
    String name = "diagnostics-client-" + id + "-" + currentTimeMillis();
    ILogger logger = loggingService.getLogger(Diagnostics.class);
    HazelcastThreadGroup hzThreadGroup = new HazelcastThreadGroup(getName(), logger, config.getClassLoader());
    return new Diagnostics(name, logger, hzThreadGroup, properties);
}
Also used : Diagnostics(com.hazelcast.internal.diagnostics.Diagnostics) ILogger(com.hazelcast.logging.ILogger) HazelcastThreadGroup(com.hazelcast.instance.HazelcastThreadGroup)

Example 3 with Diagnostics

use of com.hazelcast.internal.diagnostics.Diagnostics in project hazelcast by hazelcast.

the class MapStoreWrapper method instrument.

public void instrument(NodeEngine nodeEngine) {
    Diagnostics diagnostics = ((NodeEngineImpl) nodeEngine).getDiagnostics();
    StoreLatencyPlugin storeLatencyPlugin = diagnostics.getPlugin(StoreLatencyPlugin.class);
    if (storeLatencyPlugin == null) {
        return;
    }
    if (mapLoader != null) {
        this.mapLoader = new LatencyTrackingMapLoader(mapLoader, storeLatencyPlugin, mapName);
    }
    if (mapStore != null) {
        this.mapStore = new LatencyTrackingMapStore(mapStore, storeLatencyPlugin, mapName);
    }
}
Also used : NodeEngineImpl(com.hazelcast.spi.impl.NodeEngineImpl) Diagnostics(com.hazelcast.internal.diagnostics.Diagnostics) StoreLatencyPlugin(com.hazelcast.internal.diagnostics.StoreLatencyPlugin)

Example 4 with Diagnostics

use of com.hazelcast.internal.diagnostics.Diagnostics in project hazelcast by hazelcast.

the class NodeEngineImpl method newDiagnostics.

private Diagnostics newDiagnostics() {
    Member localMember = node.getLocalMember();
    Address address = localMember.getAddress();
    String addressString = address.getHost().replace(":", "_") + "_" + address.getPort();
    String name = "diagnostics-" + addressString + "-" + currentTimeMillis();
    return new Diagnostics(name, loggingService.getLogger(Diagnostics.class), node.getHazelcastThreadGroup(), node.getProperties());
}
Also used : Address(com.hazelcast.nio.Address) Diagnostics(com.hazelcast.internal.diagnostics.Diagnostics) Member(com.hazelcast.core.Member)

Example 5 with Diagnostics

use of com.hazelcast.internal.diagnostics.Diagnostics in project hazelcast by hazelcast.

the class RingbufferStoreWrapper method instrument.

void instrument(NodeEngine nodeEngine) {
    Diagnostics diagnostics = ((NodeEngineImpl) nodeEngine).getDiagnostics();
    StoreLatencyPlugin storeLatencyPlugin = diagnostics.getPlugin(StoreLatencyPlugin.class);
    if (!enabled || storeLatencyPlugin == null) {
        return;
    }
    this.store = new LatencyTrackingRingbufferStore(store, storeLatencyPlugin, name);
}
Also used : NodeEngineImpl(com.hazelcast.spi.impl.NodeEngineImpl) Diagnostics(com.hazelcast.internal.diagnostics.Diagnostics) StoreLatencyPlugin(com.hazelcast.internal.diagnostics.StoreLatencyPlugin)

Aggregations

Diagnostics (com.hazelcast.internal.diagnostics.Diagnostics)5 StoreLatencyPlugin (com.hazelcast.internal.diagnostics.StoreLatencyPlugin)3 NodeEngineImpl (com.hazelcast.spi.impl.NodeEngineImpl)3 Member (com.hazelcast.core.Member)1 HazelcastThreadGroup (com.hazelcast.instance.HazelcastThreadGroup)1 ILogger (com.hazelcast.logging.ILogger)1 Address (com.hazelcast.nio.Address)1