destroyLockingProcess static method

void destroyLockingProcess(
  1. SDKOptions sdkOptions,
  2. int maxTimeoutInMilliseconds
)

Checks if cache folder is locked.

Does nothing if cache is not locked or locked by current process. If cache is locked by a different process then the HERE SDK makes a few attempts to kill the locking application during the specified timeout. If it fails to kill the application, it attempts to remove the cache at SDKOptions.cachePath. This function can be used before creating a SDKNativeEngine, i.e.

{@code
     final options = SDKOptions(...);
     LockingProcess.destroyLockingProcess(options, 300);
     final engine = SDKNativeEngine(options);
}
  • sdkOptions The options which are supposed to be used for a new instance of the engine.

  • maxTimeoutInMilliseconds The maximum timeout in milliseconds. Recommended value is 300 - 500 milliseconds. If 0 or a negative value is passed then it makes only one attempt to kill the locking process (if any) and waits 30 milliseconds before exit because the system may spend a small amount of time to perform the operation.

Implementation

static void destroyLockingProcess(SDKOptions sdkOptions, int maxTimeoutInMilliseconds) => $prototype.destroyLockingProcess(sdkOptions, maxTimeoutInMilliseconds);