Open-source multiplayer game server compatible with the RuneScape client
https://www.openrs2.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
501 B
16 lines
501 B
package org.openrs2.db
|
|
|
|
/**
|
|
* A functional interface for calculating the delay before a transaction is
|
|
* retried due to deadlock.
|
|
*/
|
|
public fun interface BackoffStrategy {
|
|
/**
|
|
* Returns the delay in milliseconds to wait for after the given
|
|
* transaction [attempt] number.
|
|
* @param attempt the attempt number, starting at 0 to compute the delay
|
|
* after the first failed attempt.
|
|
* @return the delay in milliseconds.
|
|
*/
|
|
public fun getDelay(attempt: Int): Long
|
|
}
|
|
|