Top Fields Constructors Methods
stormpot

pack-priv abstract Class BSlotColdFields<T extends Poolable>

Located in compilation unit of stormpot.BSlot.

extends Padding2
implements Slot, SlotInfo<T extends Poolable>
Class Inheritance
All Implemented Interfaces
stormpot.SlotInfo, stormpot.Slot
Known Direct Subclasses
stormpot.BSlot

Field Summary

Modifier and TypeField and Description
pack-priv long
pack-priv long
pack-priv final BlockingQueue<BSlot<T>>
pack-priv T
pack-priv Exception
pack-priv final AtomicInteger
pack-priv long

Constructor Summary

AccessConstructor and Description
pack-priv
BSlotColdFields(int state, BlockingQueue<BSlot<T>> live, AtomicInteger poisonedSlots)

Method Summary

Modifier and TypeMethod and Description
public void
expire(Poolable
A reference to the Poolable object that is allocated for this slot, and is being expired.
obj
)

Implements stormpot.Slot.expire.

Mark the object represented by this slot as expired.

Field Detail

claimsback to summary
pack-priv long claims
createdNanosback to summary
pack-priv long createdNanos
liveback to summary
pack-priv final BlockingQueue<BSlot<T>> live
objback to summary
pack-priv T obj
poisonback to summary
pack-priv Exception poison
poisonedSlotsback to summary
pack-priv final AtomicInteger poisonedSlots
stampback to summary
pack-priv long stamp

Constructor Detail

BSlotColdFieldsback to summary
pack-priv BSlotColdFields(int state, BlockingQueue<BSlot<T>> live, AtomicInteger poisonedSlots)

Method Detail

expireback to summary
public void expire(Poolable obj)

Implements stormpot.Slot.expire.

Doc from stormpot.Slot.expire.

Mark the object represented by this slot as expired. Expired objects cannot be claimed again, and will be deallocated by the pool at the earliest convenience. Objects are normally expired automatically using the Expiration policy that the pool has been configured with. If an object through its use is found to be unusable, then it can be explicitly expired using this method. Objects can only be explicitly expired while they are claimed, and such expired objects will not be deallocated until they are released back to the pool. It is a user error to expire objects that are not currently claimed. It is likewise a user error to expire a Slot while inside the Allocators allocate method. The expiration only takes effect after the object has been released, so calling this method from within the Expirations hasExpired method will not prevent the object from being claimed, but will prevent it from being claimed again after it's been released back to the pool. An Expiration policy that expires all objects with this method, is effectively allowing objects to only be claimed once. Pools are free to throw a PoolException if they detect any wrong uses, but it is not guaranteed and the exact behaviour is not specified. "Unspecified behaviour" means that dead-locks and infinite loops are fair responses as well. Therefore, heed the advice and don't misuse expire! Pools must, however, guarantee that an object is never deallocated more than once. This guarantee must hold even if expire is misused.

Parameters
obj:Poolable

A reference to the Poolable object that is allocated for this slot, and is being expired.

Annotations
@Override