public final class NativeOomRetry extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
OPTION_RETRY_AFTER_GC
BON constant gating the retry-after-GC behaviour on native OOM.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
retryAfterGc(int resultCode)
Decides whether a failed native operation should be retried once after a garbage collection.
|
static boolean |
retryAfterGc(NativeException e)
Decides whether a failed native operation should be retried once after a garbage collection.
|
public static final String OPTION_RETRY_AFTER_GC
public static boolean retryAfterGc(int resultCode)
When the option is enabled and the given result code is a native out-of-memory, triggers a System.gc()
to release unreachable crypto resources and returns true.
resultCode - the result code returned by the native call.true if the caller should retry the native operation once.public static boolean retryAfterGc(NativeException e)
When the option is enabled and the given exception is a native out-of-memory, triggers a System.gc() to
release unreachable crypto resources and returns true.
e - the exception thrown by the native call.true if the caller should retry the native operation once.