Top Fields Constructors Methods
stormpot

pack-priv Class InlineAllocationController<T extends Poolable>

extends AllocationController<T extends Poolable>
Class Inheritance
Imports
java.lang.invoke.MethodHandles, .VarHandle, java.util.ArrayList, .List, java.util.concurrent.LinkedTransferQueue, .TimeUnit, java.util.concurrent.atomic.AtomicInteger

Field Summary

Modifier and TypeField and Description
private static final VarHandle
private volatile long
private final Reallocator<T>
private final RefillPile<T>
private static final VarHandle
private volatile long
private final PreciseLeakDetector
private final LinkedTransferQueue<BSlot<T>>
private final MetricsRecorder
private final RefillPile<T>
private final AtomicInteger
private final BSlot<T>
private volatile boolean
private static final VarHandle
private volatile int
private volatile int

Constructor Summary

AccessConstructor and Description
pack-priv
InlineAllocationController(LinkedTransferQueue<BSlot<T>> live, RefillPile<T> disregardPile, RefillPile<T> newAllocations, PoolBuilder<T> builder, BSlot<T> poisonPill)

Method Summary

Modifier and TypeMethod and Description
private void
alloc(BSlot<T> slot)

private void
private void
changePoolSize(int targetSize)

pack-priv long
private void
dealloc(BSlot<T> slot)

private void
deallocSlot(BSlot<T> slot)

pack-priv long
pack-priv long
pack-priv int
private void
incrementAllocationCounts(boolean success)

pack-priv void
private void
publishSlot(BSlot<T> slot, boolean success, long now)

private void
realloc(BSlot<T> slot)

private void
recordObjectLifetimeSample(long nanoseconds)

private void
private void
resetSlot(BSlot<T> slot, long now)

pack-priv synchronized void
setTargetSize(int targetSize)

Implements abstract stormpot.AllocationController.setTargetSize.

pack-priv synchronized Completion
private boolean
private boolean
private void

Field Detail

ALLOC_COUNTback to summary
private static final VarHandle ALLOC_COUNT
allocationCountback to summary
private volatile long allocationCount
Annotations
@SuppressWarnings:unused
allocatorback to summary
private final Reallocator<T> allocator
disregardPileback to summary
private final RefillPile<T> disregardPile
FAILED_ALLOC_COUNTback to summary
private static final VarHandle FAILED_ALLOC_COUNT
failedAllocationCountback to summary
private volatile long failedAllocationCount
Annotations
@SuppressWarnings:unused
leakDetectorback to summary
private final PreciseLeakDetector leakDetector
liveback to summary
private final LinkedTransferQueue<BSlot<T>> live
metricsRecorderback to summary
private final MetricsRecorder metricsRecorder
newAllocationsback to summary
private final RefillPile<T> newAllocations
poisonedSlotsback to summary
private final AtomicInteger poisonedSlots
poisonPillback to summary
private final BSlot<T> poisonPill
shutdownback to summary
private volatile boolean shutdown
SIZEback to summary
private static final VarHandle SIZE
sizeback to summary
private volatile int size
Annotations
@SuppressWarnings:unused
targetSizeback to summary
private volatile int targetSize

Constructor Detail

InlineAllocationControllerback to summary
pack-priv InlineAllocationController(LinkedTransferQueue<BSlot<T>> live, RefillPile<T> disregardPile, RefillPile<T> newAllocations, PoolBuilder<T> builder, BSlot<T> poisonPill)

Method Detail

allocback to summary
private void alloc(BSlot<T> slot)
allocateback to summary
private void allocate()
changePoolSizeback to summary
private void changePoolSize(int targetSize)
countLeakedObjectsback to summary
pack-priv long countLeakedObjects()

Implements abstract stormpot.AllocationController.countLeakedObjects.

Annotations
@Override
deallocback to summary
private void dealloc(BSlot<T> slot)
deallocSlotback to summary
private void deallocSlot(BSlot<T> slot)
getAllocationCountback to summary
pack-priv long getAllocationCount()

Implements abstract stormpot.AllocationController.getAllocationCount.

Annotations
@Override
getFailedAllocationCountback to summary
pack-priv long getFailedAllocationCount()

Implements abstract stormpot.AllocationController.getFailedAllocationCount.

Annotations
@Override
getTargetSizeback to summary
pack-priv int getTargetSize()

Implements abstract stormpot.AllocationController.getTargetSize.

Annotations
@Override
incrementAllocationCountsback to summary
private void incrementAllocationCounts(boolean success)
offerDeadSlotback to summary
pack-priv void offerDeadSlot(BSlot<T> slot)

Implements abstract stormpot.AllocationController.offerDeadSlot.

Annotations
@Override
publishSlotback to summary
private void publishSlot(BSlot<T> slot, boolean success, long now)
reallocback to summary
private void realloc(BSlot<T> slot)
recordObjectLifetimeSampleback to summary
private void recordObjectLifetimeSample(long nanoseconds)
registerWithLeakDetectorback to summary
private void registerWithLeakDetector(BSlot<T> slot)
resetSlotback to summary
private void resetSlot(BSlot<T> slot, long now)
setTargetSizeback to summary
pack-priv synchronized void setTargetSize(int targetSize)

Implements abstract stormpot.AllocationController.setTargetSize.

Annotations
@Override
shutdownback to summary
pack-priv synchronized Completion shutdown()

Implements abstract stormpot.AllocationController.shutdown.

Annotations
@Override
shutdownCompletionback to summary
private boolean shutdownCompletion(Timeout timeout) throws InterruptedException
tryDeallocateback to summary
private boolean tryDeallocate()
unregisterWithLeakDetectorback to summary
private void unregisterWithLeakDetector(BSlot<T> slot)