Skip to content

Commit

Permalink
move atomic classes from metrics to concurrent classes (#9704)
Browse files Browse the repository at this point in the history
Signed-off-by: Hendrik Ebbers <hendrik.ebbers@web.de>
  • Loading branch information
hendrikebbers committed Nov 10, 2023
1 parent af2f38e commit a475884
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

import com.swirlds.base.utility.ToStringBuilder;
import com.swirlds.common.metrics.DoubleAccumulator;
import com.swirlds.common.metrics.atomic.AtomicDouble;
import com.swirlds.common.metrics.platform.Snapshot.SnapshotEntry;
import com.swirlds.common.threading.atomic.AtomicDouble;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.util.List;
import java.util.function.DoubleBinaryOperator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

import com.swirlds.base.utility.ToStringBuilder;
import com.swirlds.common.metrics.DoubleGauge;
import com.swirlds.common.metrics.atomic.AtomicDouble;
import com.swirlds.common.metrics.platform.Snapshot.SnapshotEntry;
import com.swirlds.common.threading.atomic.AtomicDouble;
import java.util.List;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import com.swirlds.common.metrics.IntegerPairAccumulator;
import com.swirlds.common.metrics.MetricConfig;
import com.swirlds.common.metrics.MetricType;
import com.swirlds.common.metrics.atomic.AtomicIntPair;
import com.swirlds.common.metrics.platform.Snapshot.SnapshotEntry;
import com.swirlds.common.threading.atomic.AtomicIntPair;
import java.util.List;
import java.util.function.BiFunction;
import java.util.function.IntSupplier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Hedera Hashgraph, LLC
* Copyright (C) 2023 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.swirlds.common.metrics.atomic;
package com.swirlds.common.threading.atomic;

import static java.lang.Double.doubleToRawLongBits;
import static java.lang.Double.longBitsToDouble;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Hedera Hashgraph, LLC
* Copyright (C) 2023 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.swirlds.common.metrics.atomic;
package com.swirlds.common.threading.atomic;

import com.swirlds.common.utility.ByteUtils;
import java.util.concurrent.atomic.AtomicLong;
Expand Down
2 changes: 1 addition & 1 deletion platform-sdk/swirlds-common/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
exports com.swirlds.common.merkle.synchronization.views;
exports com.swirlds.common.merkle.utility;
exports com.swirlds.common.metrics;
exports com.swirlds.common.metrics.atomic;
exports com.swirlds.common.metrics.config;
exports com.swirlds.common.metrics.noop;
exports com.swirlds.common.metrics.platform;
Expand Down Expand Up @@ -162,6 +161,7 @@
com.swirlds.platform.test,
com.swirlds.platform.gui;
exports com.swirlds.common.startup;
exports com.swirlds.common.threading.atomic;

requires transitive com.fasterxml.jackson.core;
requires transitive com.fasterxml.jackson.databind;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.within;

import com.swirlds.common.threading.atomic.AtomicDouble;
import org.junit.jupiter.api.Test;

class AtomicDoubleTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static org.assertj.core.api.Assertions.assertThat;

import com.swirlds.base.utility.Pair;
import com.swirlds.common.threading.atomic.AtomicIntPair;
import org.junit.jupiter.api.Test;

class AtomicIntPairTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import com.swirlds.common.metrics.atomic.AtomicDouble;
import com.swirlds.common.threading.atomic.AtomicDouble;
import com.swirlds.common.units.UnitConstants;
import com.swirlds.merkledb.collections.LongListOffHeap;
import com.swirlds.test.framework.TestQualifierTags;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.swirlds.platform.stats.atomic;

import com.swirlds.common.metrics.atomic.AtomicIntPair;
import com.swirlds.common.threading.atomic.AtomicIntPair;

/**
* Atomically sums the values provided as well as counting the number of additions
Expand Down

0 comments on commit a475884

Please sign in to comment.