CapabilityStatusstatus=service.getStatus(Capability.DATASTORE_WRITE).getStatus();if(status==CapabilityStatus.DISABLED){// Datastore is in read-only mode.}
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-20。"],[[["\u003cp\u003eThe Capabilities API allows applications to detect outages and scheduled downtime for specific API capabilities, helping to minimize application downtime by bypassing unavailable services.\u003c/p\u003e\n"],["\u003cp\u003eThis API supports first-generation runtimes and can be utilized when upgrading to corresponding second-generation runtimes, with specific migration guidance provided for Java 11/17 runtimes.\u003c/p\u003e\n"],["\u003cp\u003eThe API returns an \u003ccode\u003eENABLED\u003c/code\u003e status for all services except "Datastore writes," which returns \u003ccode\u003eDISABLED\u003c/code\u003e when Datastore is in read-only mode.\u003c/p\u003e\n"],["\u003cp\u003eYou can query the availability of Datastore reads and writes separately, enabling you to handle read-only mode scenarios by displaying a custom message to users.\u003c/p\u003e\n"],["\u003cp\u003eThe API can verify the status of services like BLOBSTORE, Datastore, Images, Mail, Memcache, Task Queue, and URL Fetch, allowing for more fault-tolerant applications.\u003c/p\u003e\n"]]],[],null,[]]