Class Acquired<T>

java.lang.Object
net.minestom.server.thread.Acquired<T>
Type Parameters:
T - the type of the acquired object

public final class Acquired<T> extends Object
Represents an object that has been safely acquired and can be freed again.

This class should not be shared, and it is recommended to call unlock() once the acquisition goal has been fulfilled to limit blocking time.

  • Method Details

    • get

      @NotNull public T get()
    • unlock

      public void unlock()