io.rsocket.core.LeasePermitHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rsocket-core Show documentation
Show all versions of rsocket-core Show documentation
Core functionality for the RSocket library
The newest version!
package io.rsocket.core;
/** Handler which enables async lease permits issuing */
interface LeasePermitHandler {
/**
* Called by {@link RequesterLeaseTracker} when there is an available lease
*
* @return {@code true} to indicate that lease permit was consumed successfully
*/
boolean handlePermit();
/**
* Called by {@link RequesterLeaseTracker} when there are no lease permit available at the moment
* and the list of awaiting {@link LeasePermitHandler} reached the configured limit
*
* @param t associated lease permit rejection exception
*/
void handlePermitError(Throwable t);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy