FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy
public
static
class
FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy
extends FontRequestEmojiCompatConfig.RetryPolicy
A retry policy implementation that doubles the amount of time in between retries.
If downloading hasn't finish within given amount of time, this policy give up and the
EmojiCompat will get into EmojiCompat.LOAD_STATE_FAILED
state.
Summary
Public methods |
long
|
getRetryDelay()
Called each time the metadata loading fails.
|
Inherited methods |
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
ExponentialBackoffRetryPolicy
public ExponentialBackoffRetryPolicy (long totalMs)
Parameters |
totalMs |
long : A total amount of time to wait in milliseconds.
|
Public methods
getRetryDelay
public long getRetryDelay ()
Called each time the metadata loading fails.
This is primarily due to a pending download of the font.
If a value larger than zero is returned, metadata loader will retry after the given
milliseconds.
If zero
is returned, metadata loader will retry immediately.
If a value less than 0 is returned, the metadata loader will stop retrying and
EmojiCompat will get into EmojiCompat.LOAD_STATE_FAILED
state.
Note that the retry may happen earlier than you specified if the font provider notifies
that the download is completed.
Returns |
long |
long milliseconds to wait until next retry
|