Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ public MetricsDataMonitor() {
* @return QueueMetrics object based on key
*/
public QueueMetricsData getOrCreateQueueMetrics(String pathId) {
return queueMetrics.computeIfAbsent(pathId, p -> {
return new QueueMetricsData();
});
return queueMetrics.computeIfAbsent(pathId, p -> new QueueMetricsData()
);
}

/**
Expand All @@ -86,10 +85,10 @@ public Map<String, QueueMetricsData> getQueueMetrics() {
/**
* Returns the map of average values for both instance and operational level.
*
* @return queue metrics map
* @param newMap the new map which passed to queue metrics
*/
public Map<String, QueueMetricsData> setQueueMetrics(Map<String, QueueMetricsData> newMap) {
return queueMetrics = newMap;
public void setQueueMetrics(Map<String, QueueMetricsData> newMap) {
queueMetrics = newMap;
}

/**
Expand Down Expand Up @@ -120,6 +119,7 @@ public void incrementTotalReqProvider() {

/**
* Sets the total requests per provider.
* @param totalReqProvider the total requests per provider
*/
public void setTotalReqProvider(Long totalReqProvider) {
this.totalReqProvider = totalReqProvider;
Expand All @@ -143,6 +143,7 @@ public void incrementTotalFailReqProvider() {

/**
* Sets the total failed requests per provider.
* @param totalFailedReqProvider the total failed requests per provider
*/
public void setTotalFailReqProvider(Long totalFailedReqProvider) {
this.totalFailReqProvider = totalFailedReqProvider;
Expand All @@ -166,6 +167,7 @@ public void incrementTotalReqConsumer() {

/**
* Sets the total failed requests per consumer.
* @param totalReqConsumer the total requests per consumer
*/
public void setTotalReqConsumer(Long totalReqConsumer) {
this.totalReqConsumer = totalReqConsumer;
Expand All @@ -189,6 +191,7 @@ public void incrementTotalFailReqConsumer() {

/**
* Sets the total failed requests per consumer.
* @param totalFailedReqConsumer the total failed requests per consumer
*/
public void setTotalFailReqConsumer(Long totalFailedReqConsumer) {
this.totalFailReqConsumer = totalFailedReqConsumer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
public final class MetricsDataMonitorUtil {

/**
/*
* Sets the total requests per provider and consumer.
*/
public void setAllReqProviderAndConsumer(String operationPath, String invocationType) {
Expand All @@ -39,7 +39,7 @@ public void setAllReqProviderAndConsumer(String operationPath, String invocation
}
}

/**
/*
* Sets the total failed requests per provider and consumer.
*/
public void setAllFailReqProviderAndConsumer(String operationPath, String invocationType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,14 @@ public void setMaxLifeTimeInQueue(long maxLifeTimeInQueue) {
}

/**
* Sets minimum lifetime in queue.
* @param maxLifeTimeInQueue maximum lifetime
* Resets minimum lifetime in queue.
*/
public void resetMinLifeTimeInQueue() {
this.minLifeTimeInQueue = 0L;
}

/**
* resets maximum lifetime in queue.
* @param maxLifeTimeInQueue maximum lifetime
* Resets maximum lifetime in queue.
*/
public void resetMaxLifeTimeInQueue() {
this.maxLifeTimeInQueue = 0L;
Expand Down