Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make internal classes final where possible #177

Merged
merged 1 commit into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;

public class DirectAllocationController<T extends Poolable> extends AllocationController<T> {
public final class DirectAllocationController<T extends Poolable> extends AllocationController<T> {
private final LinkedTransferQueue<BSlot<T>> live;
private final RefillPile<T> disregardPile;
private final BSlot<T> poisonPill;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

import static java.util.Objects.requireNonNull;

public class InlineAllocationController<T extends Poolable> extends AllocationController<T> {
public final class InlineAllocationController<T extends Poolable> extends AllocationController<T> {
private static final VarHandle SIZE;
private static final VarHandle ALLOC_COUNT;
private static final VarHandle FAILED_ALLOC_COUNT;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/stormpot/internal/OrExpiration.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @author Guillaume Lederrey
* @since 2.4
*/
public class OrExpiration<T extends Poolable> implements Expiration<T> {
public final class OrExpiration<T extends Poolable> implements Expiration<T> {
private final Expiration<T> firstExpiration;
private final Expiration<T> secondExpiration;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/stormpot/internal/PoolBuilderDefaults.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import java.util.concurrent.ThreadFactory;

public class PoolBuilderDefaults {
public final class PoolBuilderDefaults {
public final Expiration<? super Poolable> expiration;
public final ThreadFactory threadFactory;
public final boolean preciseLeakDetectionEnabled;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/stormpot/internal/RefillSlot.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import stormpot.Poolable;

public class RefillSlot<T extends Poolable> {
public final class RefillSlot<T extends Poolable> {
final BSlot<T> slot;
volatile RefillSlot<T> next;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
import java.util.concurrent.LinkedTransferQueue;
import java.util.concurrent.ThreadFactory;

public class ThreadedAllocationController<T extends Poolable> extends AllocationController<T> {
public final class ThreadedAllocationController<T extends Poolable> extends AllocationController<T> {
private final BAllocThread<T> allocator;
private final Thread allocatorThread;

ThreadedAllocationController(
LinkedTransferQueue<BSlot<T>> live,
RefillPile<T> disregardPile,
Expand Down
Loading