Package io.agroal.api.cache
Interface Acquirable
public interface Acquirable
Contract for objects that can be acquired.
- Author:
- Luis Barreiro
-
Method Summary
Modifier and TypeMethodDescriptionbooleanacquire()Attempts to acquire this object.booleanThis method signals if the object can't be acquired in future calls to acquire().
-
Method Details
-
acquire
boolean acquire()Attempts to acquire this object.- Returns:
- true on successful object acquisition, false otherwise.
-
isAcquirable
boolean isAcquirable()This method signals if the object can't be acquired in future calls to acquire().- Returns:
- true if this object can eventually be acquired in the future.
-