क्या आपको Google Ads API के बारे में सुझाव/राय देनी है या शिकायत करनी है? उपयोगकर्ताओं पर की जाने वाली रिसर्च में हिस्सा लेने का न्योता पाने के लिए, साइन अप करें!
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
एपीआई को किए गए कई कॉल में, लंबे समय तक चलने वाले ऑपरेशन दिखते हैं. ये सुविधाएं, स्टेटस को ट्रैक करती हैं
काम करती है, जो लंबे समय तक काम करती है, जैसे कि
RPC को ब्लॉक करना ज़रूरी नहीं है.
OperationsFuture क्लास
एलआरओ के साथ इंटरैक्ट करने का सबसे आसान तरीका है
OperationFuture क्लास. अगर इसका इस्तेमाल किया जाता है, तो पक्का करें कि सर्विस क्लाइंट खत्म न हुआ हो.
इसका सुझाव नहीं दिया जाता:
privatevoiddoSomething(){OperationFuture<Empty,Empty>future=startLongRunningOperation(jobName);future.get();}privateOperationFuture<Empty,Empty>startLongRunningOperation(StringjobToStart)throwsUnsupportedEncodingException{try(OfflineUserDataJobServiceClientofflineUserDataJobServiceClient=googleAdsClient.getLatestVersion().createOfflineUserDataJobServiceClient()){// Issues an asynchronous request to run the offline user data job for executing// all added operations.returnofflineUserDataJobServiceClient.runOfflineUserDataJobAsync(jobToStart);}}
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2024-10-14 (UTC) को अपडेट किया गया."],[[["Several API calls initiate long-running operations, tracked by jobs that execute over time, making blocking RPCs undesirable."],["The `OperationFuture` class facilitates interaction with long-running operations, but requires the service client to remain active during its usage."],["Directly using `OperationFuture` within a method without ensuring the service client's lifespan can lead to issues."],["It's recommended to utilize `OperationFuture` within the scope of the service client, as demonstrated in the \"Recommended\" code example, to prevent premature client destruction."]]],[]]