Skip to content

Commit

Permalink
OAK-11213 : removed usage of Guava Queues.newConcurrentLinkedQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishabh Kumar committed Oct 22, 2024
1 parent 2031e44 commit 487699a
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 487699a

Please sign in to comment.