Skip to content

Commit c8499a4

Browse files
committed
adjust after rebase
1 parent 4089906 commit c8499a4

File tree

11 files changed

+77
-32
lines changed

11 files changed

+77
-32
lines changed

dd-trace-core/src/main/java/datadog/trace/common/metrics/Aggregator.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import datadog.trace.common.metrics.SignalItem.StopSignal;
66
import datadog.trace.core.util.LRUCache;
7-
import datadog.trace.util.queue.NonBlockingQueue;
87
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
98
import java.util.Iterator;
109
import java.util.Map;

dd-trace-core/src/main/java/datadog/trace/common/metrics/ConflatingMetricsAggregator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
import java.util.concurrent.Future;
4747
import java.util.concurrent.TimeUnit;
4848
import java.util.function.Function;
49-
import org.jctools.queues.MessagePassingQueue;
5049
import javax.annotation.Nonnull;
50+
import org.jctools.queues.MessagePassingQueue;
5151
import org.slf4j.Logger;
5252
import org.slf4j.LoggerFactory;
5353

utils/queue-utils/build.gradle.kts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
12
import groovy.lang.Closure
23
import org.gradle.kotlin.dsl.extra
34

45
plugins {
56
`java-library`
6-
id("de.thetaphi.forbiddenapis") version "3.8"
77
id("me.champeau.jmh")
88
idea
99
}
@@ -17,8 +17,12 @@ java {
1717
languageVersion = JavaLanguageVersion.of(11)
1818
}
1919
}
20-
21-
tasks.withType<Javadoc>().configureEach() {
20+
/*
21+
tasks.named<CheckForbiddenApis>("forbiddenApisMain_java11") {
22+
failOnMissingClasses = false
23+
}
24+
*/
25+
tasks.withType<Javadoc>().configureEach {
2226
javadocTool = javaToolchains.javadocToolFor(java.toolchain)
2327
}
2428

@@ -40,10 +44,6 @@ dependencies {
4044
testImplementation(libs.slf4j)
4145
}
4246

43-
tasks.forbiddenApisMain {
44-
failOnMissingClasses = false
45-
}
46-
4747
idea {
4848
module {
4949
jdkName = "11"

utils/queue-utils/src/main/java/datadog/common/queue/BaseQueue.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ abstract class BaseQueue<E> extends AbstractQueue<E> implements MessagePassingQu
3535
protected final PaddedLong tail = new PaddedLong(); // producer index
3636
protected final PaddedLong head = new PaddedLong(); // consumer index
3737

38-
/** @param requestedCapacity queue capacity (rounded up to power of two) */
38+
/**
39+
* @param requestedCapacity queue capacity (rounded up to power of two)
40+
*/
3941
public BaseQueue(int requestedCapacity) {
4042
this.capacity = roundToPowerOfTwo(requestedCapacity);
4143
this.mask = this.capacity - 1;
@@ -95,7 +97,9 @@ public final int fill(Supplier<E> s) {
9597
return MessagePassingQueueUtil.fillBounded(this, s);
9698
}
9799

98-
/** @return queue capacity */
100+
/**
101+
* @return queue capacity
102+
*/
99103
@Override
100104
public final int capacity() {
101105
return capacity;

utils/queue-utils/src/main/java/datadog/common/queue/MpscArrayQueueVarHandle.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ public class MpscArrayQueueVarHandle<E> extends BaseQueue<E> {
1515
*/
1616
protected final PaddedLong producerLimit;
1717

18-
/** @param requestedCapacity queue capacity (rounded up to power of two) */
18+
/**
19+
* @param requestedCapacity queue capacity (rounded up to power of two)
20+
*/
1921
public MpscArrayQueueVarHandle(int requestedCapacity) {
2022
super(requestedCapacity);
2123
this.producerLimit = new PaddedLong(capacity);

utils/queue-utils/src/main/java/datadog/common/queue/MpscBlockingConsumerArrayQueueDelegate.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
final class MpscBlockingConsumerArrayQueueDelegate<E> implements MessagePassingBlockingQueue<E> {
1515
private final MpscBlockingConsumerArrayQueue<E> delegate;
1616

17-
/** @param capacity queue capacity */
17+
/**
18+
* @param capacity queue capacity
19+
*/
1820
MpscBlockingConsumerArrayQueueDelegate(int capacity) {
1921
this.delegate = new MpscBlockingConsumerArrayQueue<>(capacity);
2022
}

utils/queue-utils/src/main/java/datadog/common/queue/MpscBlockingConsumerArrayQueueVarHandle.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ public final class MpscBlockingConsumerArrayQueueVarHandle<E> extends MpscArrayQ
1717

1818
private final PaddedThread consumerThread = new PaddedThread();
1919

20-
/** @param requestedCapacity queue capacity (rounded up to power of two) */
20+
/**
21+
* @param requestedCapacity queue capacity (rounded up to power of two)
22+
*/
2123
public MpscBlockingConsumerArrayQueueVarHandle(int requestedCapacity) {
2224
super(requestedCapacity);
2325
}

utils/queue-utils/src/main/java/datadog/common/queue/SpmcArrayQueueVarHandle.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ public final class SpmcArrayQueueVarHandle<E> extends BaseQueue<E>
1616
/** Cached producer limit to reduce volatile tail reads. */
1717
private final PaddedLong consumerLimit = new PaddedLong();
1818

19-
/** @param requestedCapacity queue capacity (rounded up to power of two) */
19+
/**
20+
* @param requestedCapacity queue capacity (rounded up to power of two)
21+
*/
2022
public SpmcArrayQueueVarHandle(int requestedCapacity) {
2123
super(requestedCapacity);
2224
}

utils/queue-utils/src/main/java/datadog/common/queue/SpscArrayQueueVarHandle.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ public final class SpscArrayQueueVarHandle<E> extends BaseQueue<E> {
1313
private long cachedTail = 0L; // visible only to consumer
1414
private final int lookAheadStep;
1515

16-
/** @param requestedCapacity queue capacity (rounded up to power of two) */
16+
/**
17+
* @param requestedCapacity queue capacity (rounded up to power of two)
18+
*/
1719
public SpscArrayQueueVarHandle(int requestedCapacity) {
1820
super(requestedCapacity);
1921
// This should go in a common place because today is defined under jctools-channel
@@ -45,7 +47,9 @@ public boolean offer(E e) {
4547
return true;
4648
}
4749

48-
/** @return head element or null if empty */
50+
/**
51+
* @return head element or null if empty
52+
*/
4953
@Override
5054
@SuppressWarnings("unchecked")
5155
public E poll() {
@@ -68,7 +72,9 @@ public E poll() {
6872
return value;
6973
}
7074

71-
/** @return head element or null if empty */
75+
/**
76+
* @return head element or null if empty
77+
*/
7278
@Override
7379
@SuppressWarnings("unchecked")
7480
public E peek() {
@@ -197,13 +203,17 @@ public boolean relaxedOffer(E e) {
197203
return offer(e);
198204
}
199205

200-
/** @return head element or null if empty */
206+
/**
207+
* @return head element or null if empty
208+
*/
201209
@Override
202210
public E relaxedPoll() {
203211
return poll();
204212
}
205213

206-
/** @return head element or null if empty */
214+
/**
215+
* @return head element or null if empty
216+
*/
207217
@Override
208218
public E relaxedPeek() {
209219
return peek();

utils/queue-utils/src/main/java/datadog/common/queue/padding/PaddedLong.java

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,47 +20,65 @@ public PaddedLong() {
2020
this(0L);
2121
}
2222

23-
/** @param initialValue the initial value */
23+
/**
24+
* @param initialValue the initial value
25+
*/
2426
public PaddedLong(long initialValue) {
2527
setPlain(initialValue);
2628
}
2729

28-
/** @return value with volatile semantics (full visibility) */
30+
/**
31+
* @return value with volatile semantics (full visibility)
32+
*/
2933
public long getVolatile() {
3034
return (long) VALUE_HANDLE.getVolatile(this);
3135
}
3236

33-
/** @return value with acquire semantics (pairs with setRelease) */
37+
/**
38+
* @return value with acquire semantics (pairs with setRelease)
39+
*/
3440
public long getAcquire() {
3541
return (long) VALUE_HANDLE.getAcquire(this);
3642
}
3743

38-
/** @return value with plain semantics (no ordering) */
44+
/**
45+
* @return value with plain semantics (no ordering)
46+
*/
3947
public long getPlain() {
4048
return (long) VALUE_HANDLE.get(this);
4149
}
4250

43-
/** @return value with opaque semantics (bitwise atomicity only) */
51+
/**
52+
* @return value with opaque semantics (bitwise atomicity only)
53+
*/
4454
public long getOpaque() {
4555
return (long) VALUE_HANDLE.getOpaque(this);
4656
}
4757

48-
/** @param newValue value to store with volatile semantics (full visibility) */
58+
/**
59+
* @param newValue value to store with volatile semantics (full visibility)
60+
*/
4961
public void setVolatile(long newValue) {
5062
VALUE_HANDLE.setVolatile(this, newValue);
5163
}
5264

53-
/** @param newValue value to store with release semantics (pairs with getAcquire) */
65+
/**
66+
* @param newValue value to store with release semantics (pairs with getAcquire)
67+
*/
5468
public void setRelease(long newValue) {
5569
VALUE_HANDLE.setRelease(this, newValue);
5670
}
5771

58-
/** @param newValue value to store with plain semantics (no ordering) */
72+
/**
73+
* @param newValue value to store with plain semantics (no ordering)
74+
*/
5975
public void setPlain(long newValue) {
6076
VALUE_HANDLE.set(this, newValue);
6177
}
6278

63-
/** @param newValue value to store with opaque semantics (bitwise atomicity only) */
79+
/**
80+
* @param newValue value to store with opaque semantics (bitwise atomicity only)
81+
*/
6482
public void setOpaque(long newValue) {
6583
VALUE_HANDLE.setOpaque(this, newValue);
6684
}

0 commit comments

Comments
 (0)