Search in sources :

Example 16 with LocalQueueStatsImpl

use of com.hazelcast.internal.monitor.impl.LocalQueueStatsImpl in project hazelcast by hazelcast.

the class TxnPollOperation method afterRun.

@Override
public void afterRun() throws Exception {
    LocalQueueStatsImpl queueStats = getQueueService().getLocalQueueStatsImpl(name);
    if (data == null) {
        queueStats.incrementEmptyPolls();
    } else {
        queueStats.incrementPolls();
        publishEvent(ItemEventType.REMOVED, data);
    }
}
Also used : LocalQueueStatsImpl(com.hazelcast.internal.monitor.impl.LocalQueueStatsImpl)

Example 17 with LocalQueueStatsImpl

use of com.hazelcast.internal.monitor.impl.LocalQueueStatsImpl in project hazelcast by hazelcast.

the class TxnOfferOperation method afterRun.

@Override
public void afterRun() throws Exception {
    LocalQueueStatsImpl queueStats = getQueueService().getLocalQueueStatsImpl(name);
    if (Boolean.TRUE.equals(response)) {
        queueStats.incrementOffers();
        publishEvent(ItemEventType.ADDED, data);
    } else {
        queueStats.incrementRejectedOffers();
    }
}
Also used : LocalQueueStatsImpl(com.hazelcast.internal.monitor.impl.LocalQueueStatsImpl)

Aggregations

LocalQueueStatsImpl (com.hazelcast.internal.monitor.impl.LocalQueueStatsImpl)17 Data (com.hazelcast.internal.serialization.Data)4 Address (com.hazelcast.cluster.Address)1 IPartition (com.hazelcast.internal.partition.IPartition)1