Skip to content

Commit

Permalink
Merge pull request apache#1816 from apache/OAK-11213
Browse files Browse the repository at this point in the history
OAK-11213 : removed usage of Guava Queues.newConcurrentLinkedQueue
  • Loading branch information
rishabhdaim authored Oct 23, 2024
2 parents 88bc5a6 + 487699a commit d42d3d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
*/
package org.apache.jackrabbit.oak.segment;

import static org.apache.jackrabbit.guava.common.collect.Queues.newConcurrentLinkedQueue;

import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Queue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ConcurrentMap;
import java.util.function.Supplier;

Expand Down Expand Up @@ -53,7 +52,7 @@ class CommitsTracker {
private final String[] threadGroups;
private final int otherWritersLimit;
private final ConcurrentMap<String, Commit> queuedWritersMap;
private final Queue<Commit> commits = newConcurrentLinkedQueue();
private final Queue<Commit> commits = new ConcurrentLinkedQueue<>();

/*
* Read access via getCurrentWriter() happens usually on a separate thread, thus volatile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package org.apache.jackrabbit.oak.segment.tool.iotrace;

import static org.apache.jackrabbit.guava.common.collect.Queues.newConcurrentLinkedQueue;
import static java.lang.String.join;

import java.io.File;
Expand Down Expand Up @@ -53,7 +52,7 @@ public class IOTraceMonitor extends IOMonitorAdapter implements Flushable {
private final Lock ioLock = new ReentrantLock();

@NotNull
private final ConcurrentLinkedQueue<IOEvent> ioEvents = newConcurrentLinkedQueue();
private final ConcurrentLinkedQueue<IOEvent> ioEvents = new ConcurrentLinkedQueue<>();

/**
* Create a new instance writing to {@code traceWriter} with additional context fields.
Expand Down

0 comments on commit d42d3d9

Please sign in to comment.