From 62b1d99906fb58f84f3f7819da76d177d160dd23 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Tue, 21 Oct 2025 17:41:34 +0200 Subject: [PATCH] Remove unused ConcurrentLinkedQueueWithApproximateSize --- ...currentLinkedQueueWithApproximateSize.java | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 runtime/service/src/main/java/org/apache/polaris/service/events/listeners/ConcurrentLinkedQueueWithApproximateSize.java diff --git a/runtime/service/src/main/java/org/apache/polaris/service/events/listeners/ConcurrentLinkedQueueWithApproximateSize.java b/runtime/service/src/main/java/org/apache/polaris/service/events/listeners/ConcurrentLinkedQueueWithApproximateSize.java deleted file mode 100644 index 3be25e1ad2..0000000000 --- a/runtime/service/src/main/java/org/apache/polaris/service/events/listeners/ConcurrentLinkedQueueWithApproximateSize.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.polaris.service.events.listeners; - -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.stream.Stream; - -class ConcurrentLinkedQueueWithApproximateSize { - private final ConcurrentLinkedQueue queue = new ConcurrentLinkedQueue<>(); - private final AtomicInteger size = new AtomicInteger(); - - public void add(T event) { - queue.add(event); - size.getAndIncrement(); - } - - public boolean isEmpty() { - return queue.isEmpty(); - } - - public T peek() { - return queue.peek(); - } - - public int size() { - return size.get(); - } - - public Stream stream() { - return queue.stream(); - } -}