Package net.minestom.server.thread
Interface AcquirableSource<T>
- Type Parameters:
T
- the type of the acquired object
- All Known Implementing Classes:
Entity
,EntityCreature
,EntityProjectile
,ExperienceOrb
,ItemEntity
,LivingEntity
,Player
@Experimental
public interface AcquirableSource<T>
An object that is a source of
Acquirable
objects, and can be synchronized within a ThreadDispatcher
.-
Method Summary
-
Method Details
-
acquirable
Obtains anAcquirable
. To safely perform operations on this object, the user must callAcquirable.sync(Consumer)
orAcquirable.lock()
(followed by a subsequent unlock) on the Acquirable instance.- Returns:
- an Acquirable which can be used to synchronize access to this object
-