À partir du 27 mars 2025, nous vous recommandons d'utiliser android-latest-release
au lieu de aosp-main
pour créer et contribuer à AOSP. Pour en savoir plus, consultez la section Modifications apportées à AOSP.
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
CacheClientFactory
public
final
class
CacheClientFactory
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.util.CacheClientFactory
|
Une fabrique qui crée une instance singleton de ICacheClient
.
Résumé
Constructeurs publics
CacheClientFactory
public CacheClientFactory ()
Méthodes publiques
createCacheClient
public static ICacheClient createCacheClient (File workFolder,
String instanceName)
Crée une instance singleton de ICacheClient
.
Une seule instance singleton sera créée et partagée partout dans cette invocation. Cette méthode est thread-safe.
Paramètres |
workFolder |
File : dossier de travail dans lequel le client crée des fichiers temporaires. |
instanceName |
String : nom de l'instance de l'API d'exécution à distance. |
Le contenu et les exemples de code de cette page sont soumis aux licences décrites dans la Licence de contenu. Java et OpenJDK sont des marques ou des marques déposées d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/27 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/27 (UTC)."],[],[],null,["# CacheClientFactory\n==================\n\n\n`\npublic\n\nfinal\n\nclass\nCacheClientFactory\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|----------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.util.CacheClientFactory |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA factory that creates a singleton instance of [ICacheClient](../../../../../../reference/tradefed/com/android/tradefed/cache/ICacheClient.html).\n\nSummary\n-------\n\n| ### Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[CacheClientFactory](../../../../../../reference/tradefed/com/android/tradefed/util/CacheClientFactory.html#CacheClientFactory())`() ` |\n\n| ### Public methods ||\n|-------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static `[ICacheClient](../../../../../../reference/tradefed/com/android/tradefed/cache/ICacheClient.html) | ` `[createCacheClient](../../../../../../reference/tradefed/com/android/tradefed/util/CacheClientFactory.html#createCacheClient(File,%20java.lang.String))`(File workFolder, String instanceName) ` Creates a singleton instance of [ICacheClient](../../../../../../reference/tradefed/com/android/tradefed/cache/ICacheClient.html). |\n\nPublic constructors\n-------------------\n\n### CacheClientFactory\n\n```\npublic CacheClientFactory ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### createCacheClient\n\n```\npublic static ICacheClient createCacheClient (File workFolder, \n String instanceName)\n```\n\nCreates a singleton instance of [ICacheClient](../../../../../../reference/tradefed/com/android/tradefed/cache/ICacheClient.html).\n\nOnly one singleton instance will be created and shared everywhere in this invocation. This\nmethod is thread-safe.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------------|--------------------------------------------------------------------------|\n| `workFolder` | `File`: The work folder where the client creates temporary files. \u003cbr /\u003e |\n| `instanceName` | `String`: The instance name of the remote execution API. \u003cbr /\u003e |\n\n| Returns ||\n|---------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|\n| [ICacheClient](../../../../../../reference/tradefed/com/android/tradefed/cache/ICacheClient.html) | An instance of [ICacheClient](../../../../../../reference/tradefed/com/android/tradefed/cache/ICacheClient.html). \u003cbr /\u003e |"]]