[{"data":1,"prerenderedAt":2847},["ShallowReactive",2],{"navigation_docs":3,"-sdks-server-java":133,"-sdks-server-java-surround":2235,"sdks\u002Fjava\u002Finstall":2238,"sdks\u002Fjava\u002Fconfigure":2398,"sdks\u002Fjava\u002Fsimple-usage":2523},[4,30,123],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15,20,25],{"title":11,"path":12,"stem":13,"icon":14},"Quickstart","\u002Fgetting-started\u002Fquickstart","1.getting-started\u002F1.quickstart","i-lucide-fast-forward",{"title":16,"path":17,"stem":18,"icon":19},"Core Concepts","\u002Fgetting-started\u002Fcore-concepts","1.getting-started\u002F2.core-concepts","i-lucide-workflow",{"title":21,"path":22,"stem":23,"icon":24},"Configs Anatomy","\u002Fgetting-started\u002Fconfigs","1.getting-started\u002F3.configs","i-lucide-file-cog",{"title":26,"path":27,"stem":28,"icon":29},"Architecture","\u002Fgetting-started\u002Farchitecture","1.getting-started\u002F4.architecture","i-lucide-layers",{"title":31,"defaultOpen":32,"path":33,"stem":34,"children":35,"page":6},"SDKs",true,"\u002Fsdks","2.sdks",[36,41,67,82,98],{"title":37,"path":38,"stem":39,"icon":40},"Available SDKs","\u002Fsdks\u002Favailable-sdks","2.sdks\u002F1.available-sdks","i-lucide-list",{"title":42,"icon":43,"defaultOpen":32,"path":44,"stem":45,"children":46,"page":6},"Browser SDKs","i-lucide-monitor","\u002Fsdks\u002Fbrowser","2.sdks\u002F2.browser",[47,52,57,62],{"title":48,"path":49,"stem":50,"icon":51},"Javascript","\u002Fsdks\u002Fbrowser\u002Fjavascript","2.sdks\u002F2.browser\u002F1.javascript","cd-logos-javascript",{"title":53,"path":54,"stem":55,"icon":56},"React","\u002Fsdks\u002Fbrowser\u002Freact","2.sdks\u002F2.browser\u002F2.react","cd-logos-react-light",{"title":58,"path":59,"stem":60,"icon":61},"Vue","\u002Fsdks\u002Fbrowser\u002Fvue","2.sdks\u002F2.browser\u002F3.vue","cd-logos-vue",{"title":63,"path":64,"stem":65,"icon":66},"OpenFeature Web","\u002Fsdks\u002Fbrowser\u002Fopenfeature-web","2.sdks\u002F2.browser\u002F4.openfeature-web","cd-logos-openfeature",{"title":68,"icon":69,"defaultOpen":32,"path":70,"stem":71,"children":72,"page":6},"Mobile SDKs","i-lucide-smartphone","\u002Fsdks\u002Fmobile","2.sdks\u002F3.mobile",[73,77],{"title":74,"path":75,"stem":76,"icon":56},"React Native","\u002Fsdks\u002Fmobile\u002Freact-native","2.sdks\u002F3.mobile\u002F1.react-native",{"title":78,"path":79,"stem":80,"icon":81},"Flutter","\u002Fsdks\u002Fmobile\u002Fflutter","2.sdks\u002F3.mobile\u002F2.flutter","cd-logos-flutter",{"title":83,"icon":84,"defaultOpen":32,"path":85,"stem":86,"children":87,"page":6},"Meta-framework SDKs","i-lucide-monitor-smartphone","\u002Fsdks\u002Fmeta","2.sdks\u002F4.meta",[88,93],{"title":89,"path":90,"stem":91,"icon":92},"Next.js","\u002Fsdks\u002Fmeta\u002Fnextjs","2.sdks\u002F4.meta\u002F1.nextjs","cd-logos-nextjs",{"title":94,"path":95,"stem":96,"icon":97},"Nuxt","\u002Fsdks\u002Fmeta\u002Fnuxt","2.sdks\u002F4.meta\u002F2.nuxt","cd-logos-nuxt",{"title":99,"icon":100,"defaultOpen":32,"path":101,"stem":102,"children":103,"page":6},"Server SDKs","i-lucide-server","\u002Fsdks\u002Fserver","2.sdks\u002F5.server",[104,109,113,118],{"title":105,"path":106,"stem":107,"icon":108},"Node.js","\u002Fsdks\u002Fserver\u002Fnode-js","2.sdks\u002F5.server\u002F1.node-js","cd-logos-nodejs",{"title":110,"path":111,"stem":112,"icon":66},"OpenFeature Node.js","\u002Fsdks\u002Fserver\u002Fopenfeature-node","2.sdks\u002F5.server\u002F2.openfeature-node",{"title":114,"path":115,"stem":116,"icon":117},"Python","\u002Fsdks\u002Fserver\u002Fpython","2.sdks\u002F5.server\u002F3.python","cd-logos-python",{"title":119,"path":120,"stem":121,"icon":122},"Java","\u002Fsdks\u002Fserver\u002Fjava","2.sdks\u002F5.server\u002F4.java","cd-logos-java",{"title":124,"defaultOpen":32,"path":125,"stem":126,"children":127,"page":6},"Integrations","\u002Fintegrations","3.integrations",[128],{"title":129,"path":130,"stem":131,"icon":132},"Terraform","\u002Fintegrations\u002Fterraform","3.integrations\u002F1.terraform","cd-logos-terraform",{"id":134,"title":135,"body":136,"description":234,"extension":2229,"links":2230,"meta":2231,"navigation":2232,"path":120,"seo":2233,"stem":121,"__hash__":2234},"docs\u002F2.sdks\u002F5.server\u002F4.java.md","Java Server SDK",{"type":137,"value":138,"toc":2210},"minimark",[139,143,149,154,158,166,173,177,185,189,193,207,210,214,228,271,276,283,289,295,442,447,454,497,507,594,599,602,694,865,872,1012,1017,1020,1023,1026,1060,1167,1174,1178,1185,1260,1263,1419,1423,1426,1429,1461,1496,1571,1578,1582,1585,1592,1739,1748,1813,1818,2005,2009,2012,2017,2028,2034,2040,2046,2056,2059,2064,2067,2073,2076,2080,2083,2096,2206],[140,141],"div",{"hidden":32,"dataTitleIcon":142},"java",[144,145],"external-badges",{"package-url":146,"registry":147,"repo":148},"https:\u002F\u002Fcentral.sonatype.com\u002Fartifact\u002Fcom.configdirector\u002Fconfigdirector-server-sdk","maven","java-sdks\u002Ftree\u002Fmain\u002Fconfigdirector-server-sdk",[150,151,153],"h2",{"id":152},"introduction","Introduction",[155,156,157],"p",{},"The Java Server SDK is a server-side SDK that evaluates configs and their targeting rules. Upon initialization, it retrieves configs and targeting rules from ConfigDirector services. From that point on, it evaluates configs locally for any user context, and receives updates via server sent events (SSE) when configs are updated on the dashboard or via the admin API.",[155,159,160,161,165],{},"The minimum Java version supported is ",[162,163,164],"code",{},"17",".",[155,167,168,169,172],{},"The client is thread safe. Create one instance when your application starts, share it for the lifetime of the process, and ",[162,170,171],{},"close"," it on shutdown. Evaluations read config state the client already holds in memory, so they make no network calls on the request path.",[150,174,176],{"id":175},"installation","Installation",[155,178,179,180],{},"The SDK can be installed from Maven Central: ",[181,182,146],"a",{"href":146,"rel":183},[184],"nofollow",[186,187],"content-partial",{"name":188},"sdks\u002Fjava\u002Finstall",[150,190,192],{"id":191},"configure-and-initialize-the-client","Configure and initialize the client",[194,195,196,204],"ol",{},[197,198,199,200,203],"li",{},"Create an instance of the client providing your server SDK key. You can retrieve a server SDK key under your project settings in the ",[162,201,202],{},"Environments & SDK Keys"," tab.",[197,205,206],{},"Initialize the client to initiate its connection lifecycle.",[186,208],{"name":209},"sdks\u002Fjava\u002Fconfigure",[211,212,213],"warning",{},"Server SDK keys are secret values. Do not commit them to your source code repository. Provide them at runtime via environment variables instead.",[155,215,216,219,220,223,224,227],{},[162,217,218],{},"initialize"," blocks until the initial config state arrives or the configured timeout elapses, and it never throws on a connection failure. Check ",[162,221,222],{},"isReady"," to find out whether config state actually arrived. An overload accepts a ",[162,225,226],{},"Duration"," to override the configured timeout for that call:",[229,230,235],"pre",{"className":231,"code":232,"filename":233,"language":142,"meta":234,"style":234},"language-java shiki shiki-themes material-theme-lighter github-light github-dark","client.initialize(Duration.ofSeconds(5));\n","ConfigDirectorSetup.java","",[162,236,237],{"__ignoreMap":234},[238,239,242,246,249,252,255,257,259,262,264,268],"span",{"class":240,"line":241},"line",1,[238,243,245],{"class":244},"su5hD","client",[238,247,165],{"class":248},"sP7_E",[238,250,218],{"class":251},"sGLFI",[238,253,254],{"class":248},"(",[238,256,226],{"class":244},[238,258,165],{"class":248},[238,260,261],{"class":251},"ofSeconds",[238,263,254],{"class":248},[238,265,267],{"class":266},"srdBf","5",[238,269,270],{"class":248},"));\n",[272,273,275],"h3",{"id":274},"additional-configuration-options","Additional configuration options",[155,277,278,279,282],{},"Options are adjusted through the lambda passed to ",[162,280,281],{},"ConfigDirector.client",". Every setter returns the options object, so calls chain. They are read once when the client is built; changing them afterwards has no effect.",[284,285,287],"h4",{"id":286},"metadata",[162,288,286],{},[155,290,291,292,294],{},"The ",[162,293,286],{}," option allows you to provide your application's name and version. These values can be used in targeting rules conditionals. For example, if a certain feature should only be enabled starting with a certain version of your application.",[229,296,298],{"className":231,"code":297,"filename":233,"language":142,"meta":234,"style":234},"import com.configdirector.ConfigDirector;\nimport com.configdirector.ConfigDirectorClient;\n\nConfigDirectorClient client = ConfigDirector.client(\n    \"YOUR-SERVER-SDK-KEY\",\n    options -> options.metadata(\"YOUR-APP-NAME\", \"1.0.2\"));\n\nclient.initialize();\n",[162,299,300,323,341,347,369,386,425,430],{"__ignoreMap":234},[238,301,302,306,310,312,315,317,320],{"class":240,"line":241},[238,303,305],{"class":304},"sw1J6","import",[238,307,309],{"class":308},"s_bVq"," com",[238,311,165],{"class":248},[238,313,314],{"class":308},"configdirector",[238,316,165],{"class":248},[238,318,319],{"class":308},"ConfigDirector",[238,321,322],{"class":248},";\n",[238,324,326,328,330,332,334,336,339],{"class":240,"line":325},2,[238,327,305],{"class":304},[238,329,309],{"class":308},[238,331,165],{"class":248},[238,333,314],{"class":308},[238,335,165],{"class":248},[238,337,338],{"class":308},"ConfigDirectorClient",[238,340,322],{"class":248},[238,342,344],{"class":240,"line":343},3,[238,345,346],{"emptyLinePlaceholder":32},"\n",[238,348,350,352,355,359,362,364,366],{"class":240,"line":349},4,[238,351,338],{"class":308},[238,353,354],{"class":244}," client ",[238,356,358],{"class":357},"smGrS","=",[238,360,361],{"class":244}," ConfigDirector",[238,363,165],{"class":248},[238,365,245],{"class":251},[238,367,368],{"class":248},"(\n",[238,370,372,376,380,383],{"class":240,"line":371},5,[238,373,375],{"class":374},"sjJ54","    \"",[238,377,379],{"class":378},"s_sjI","YOUR-SERVER-SDK-KEY",[238,381,382],{"class":374},"\"",[238,384,385],{"class":248},",\n",[238,387,389,392,396,399,401,403,405,407,410,412,415,418,421,423],{"class":240,"line":388},6,[238,390,391],{"class":244},"    options ",[238,393,395],{"class":394},"sbsja","->",[238,397,398],{"class":244}," options",[238,400,165],{"class":248},[238,402,286],{"class":251},[238,404,254],{"class":248},[238,406,382],{"class":374},[238,408,409],{"class":378},"YOUR-APP-NAME",[238,411,382],{"class":374},[238,413,414],{"class":248},",",[238,416,417],{"class":374}," \"",[238,419,420],{"class":378},"1.0.2",[238,422,382],{"class":374},[238,424,270],{"class":248},[238,426,428],{"class":240,"line":427},7,[238,429,346],{"emptyLinePlaceholder":32},[238,431,433,435,437,439],{"class":240,"line":432},8,[238,434,245],{"class":244},[238,436,165],{"class":248},[238,438,218],{"class":251},[238,440,441],{"class":248},"();\n",[284,443,445],{"id":444},"logger",[162,446,444],{},[155,448,449,450,453],{},"The SDK logs through SLF4J. Left to itself it writes to the logger named ",[162,451,452],{},"com.configdirector",", so logging levels, formatting, and destinations can be controlled through your usual SLF4J configuration:",[229,455,460],{"className":456,"code":457,"filename":458,"language":459,"meta":234,"style":234},"language-xml shiki shiki-themes material-theme-lighter github-light github-dark","\u003Clogger name=\"com.configdirector\" level=\"DEBUG\" \u002F>\n","logback.xml","xml",[162,461,462],{"__ignoreMap":234},[238,463,464,467,470,474,476,478,480,482,485,487,489,492,494],{"class":240,"line":241},[238,465,466],{"class":248},"\u003C",[238,468,444],{"class":469},"sQzsp",[238,471,473],{"class":472},"s9AJx"," name",[238,475,358],{"class":248},[238,477,382],{"class":374},[238,479,452],{"class":378},[238,481,382],{"class":374},[238,483,484],{"class":472}," level",[238,486,358],{"class":248},[238,488,382],{"class":374},[238,490,491],{"class":378},"DEBUG",[238,493,382],{"class":374},[238,495,496],{"class":248}," \u002F>\n",[155,498,499,500,503,504,506],{},"Alternatively, pass any SLF4J ",[162,501,502],{},"Logger"," to the ",[162,505,444],{}," option to put the SDK's output under your application's own logging namespace, where existing appenders and level configuration already apply:",[229,508,510],{"className":231,"code":509,"filename":233,"language":142,"meta":234,"style":234},"import org.slf4j.LoggerFactory;\n\nConfigDirectorClient client = ConfigDirector.client(\n    \"YOUR-SERVER-SDK-KEY\",\n    options -> options.logger(LoggerFactory.getLogger(\"my-app.configdirector\")));\n",[162,511,512,531,535,551,561],{"__ignoreMap":234},[238,513,514,516,519,521,524,526,529],{"class":240,"line":241},[238,515,305],{"class":304},[238,517,518],{"class":308}," org",[238,520,165],{"class":248},[238,522,523],{"class":308},"slf4j",[238,525,165],{"class":248},[238,527,528],{"class":308},"LoggerFactory",[238,530,322],{"class":248},[238,532,533],{"class":240,"line":325},[238,534,346],{"emptyLinePlaceholder":32},[238,536,537,539,541,543,545,547,549],{"class":240,"line":343},[238,538,338],{"class":308},[238,540,354],{"class":244},[238,542,358],{"class":357},[238,544,361],{"class":244},[238,546,165],{"class":248},[238,548,245],{"class":251},[238,550,368],{"class":248},[238,552,553,555,557,559],{"class":240,"line":349},[238,554,375],{"class":374},[238,556,379],{"class":378},[238,558,382],{"class":374},[238,560,385],{"class":248},[238,562,563,565,567,569,571,573,575,577,579,582,584,586,589,591],{"class":240,"line":371},[238,564,391],{"class":244},[238,566,395],{"class":394},[238,568,398],{"class":244},[238,570,165],{"class":248},[238,572,444],{"class":251},[238,574,254],{"class":248},[238,576,528],{"class":244},[238,578,165],{"class":248},[238,580,581],{"class":251},"getLogger",[238,583,254],{"class":248},[238,585,382],{"class":374},[238,587,588],{"class":378},"my-app.configdirector",[238,590,382],{"class":374},[238,592,593],{"class":248},")));\n",[284,595,597],{"id":596},"connection",[162,598,596],{},[155,600,601],{},"The connection option accepts a lambda receiving a builder with the following optional values:",[603,604,605,640,660,681],"ul",{},[197,606,607,610],{},[162,608,609],{},"mode",[603,611,612,635],{},[197,613,614,615,618,619,622,623,626,627,630,631,634],{},"The connection mode, which can be ",[162,616,617],{},"ConnectionMode.STREAMING",", ",[162,620,621],{},"ConnectionMode.POLLING",", or ",[162,624,625],{},"ConnectionMode.ONE_TIME",". It is recommended to use the default of ",[162,628,629],{},"STREAMING"," unless you have a specific need to use one of the others instead. ",[162,632,633],{},"ONE_TIME"," retrieves config state during initialization only, and never refreshes it.",[197,636,637,638],{},"Defaults to ",[162,639,617],{},[197,641,642,645],{},[162,643,644],{},"pollingInterval",[603,646,647,654],{},[197,648,649,650,653],{},"Only used in ",[162,651,652],{},"POLLING"," mode. The interval to poll ConfigDirector services for updates.",[197,655,637,656,659],{},[162,657,658],{},"60"," seconds",[197,661,662,665],{},[162,663,664],{},"timeout",[603,666,667,676],{},[197,668,669,670,672,673,675],{},"The timeout to be used in initialization. This is how long the ",[162,671,218],{}," method will wait for data from ConfigDirector services. If the timeout is reached, ",[162,674,218],{}," will return but the client will still be in an unready status and returning default values. While streaming, the client will continue to attempt to connect and retrieve config values in the background.",[197,677,637,678,659],{},[162,679,680],{},"3",[197,682,683,686],{},[162,684,685],{},"url",[603,687,688,691],{},[197,689,690],{},"The base URL used to connect to ConfigDirector services",[197,692,693],{},"This should only be provided if your environment requires you to configure a proxy server in order to connect to ConfigDirector services",[229,695,697],{"className":231,"code":696,"filename":233,"language":142,"meta":234,"style":234},"import com.configdirector.ConfigDirector;\nimport com.configdirector.ConnectionMode;\nimport java.time.Duration;\n\nConfigDirectorClient client = ConfigDirector.client(\n    \"YOUR-SERVER-SDK-KEY\",\n    options -> options.connection(connection -> connection\n        .mode(ConnectionMode.POLLING)\n        .pollingInterval(Duration.ofSeconds(30))\n        .timeout(Duration.ofSeconds(5))));\n",[162,698,699,715,732,750,754,770,780,802,820,843],{"__ignoreMap":234},[238,700,701,703,705,707,709,711,713],{"class":240,"line":241},[238,702,305],{"class":304},[238,704,309],{"class":308},[238,706,165],{"class":248},[238,708,314],{"class":308},[238,710,165],{"class":248},[238,712,319],{"class":308},[238,714,322],{"class":248},[238,716,717,719,721,723,725,727,730],{"class":240,"line":325},[238,718,305],{"class":304},[238,720,309],{"class":308},[238,722,165],{"class":248},[238,724,314],{"class":308},[238,726,165],{"class":248},[238,728,729],{"class":308},"ConnectionMode",[238,731,322],{"class":248},[238,733,734,736,739,741,744,746,748],{"class":240,"line":343},[238,735,305],{"class":304},[238,737,738],{"class":308}," java",[238,740,165],{"class":248},[238,742,743],{"class":308},"time",[238,745,165],{"class":248},[238,747,226],{"class":308},[238,749,322],{"class":248},[238,751,752],{"class":240,"line":349},[238,753,346],{"emptyLinePlaceholder":32},[238,755,756,758,760,762,764,766,768],{"class":240,"line":371},[238,757,338],{"class":308},[238,759,354],{"class":244},[238,761,358],{"class":357},[238,763,361],{"class":244},[238,765,165],{"class":248},[238,767,245],{"class":251},[238,769,368],{"class":248},[238,771,772,774,776,778],{"class":240,"line":388},[238,773,375],{"class":374},[238,775,379],{"class":378},[238,777,382],{"class":374},[238,779,385],{"class":248},[238,781,782,784,786,788,790,792,794,797,799],{"class":240,"line":427},[238,783,391],{"class":244},[238,785,395],{"class":394},[238,787,398],{"class":244},[238,789,165],{"class":248},[238,791,596],{"class":251},[238,793,254],{"class":248},[238,795,796],{"class":244},"connection ",[238,798,395],{"class":394},[238,800,801],{"class":244}," connection\n",[238,803,804,807,809,811,813,815,817],{"class":240,"line":432},[238,805,806],{"class":248},"        .",[238,808,609],{"class":251},[238,810,254],{"class":248},[238,812,729],{"class":244},[238,814,165],{"class":248},[238,816,652],{"class":244},[238,818,819],{"class":248},")\n",[238,821,823,825,827,829,831,833,835,837,840],{"class":240,"line":822},9,[238,824,806],{"class":248},[238,826,644],{"class":251},[238,828,254],{"class":248},[238,830,226],{"class":244},[238,832,165],{"class":248},[238,834,261],{"class":251},[238,836,254],{"class":248},[238,838,839],{"class":266},"30",[238,841,842],{"class":248},"))\n",[238,844,846,848,850,852,854,856,858,860,862],{"class":240,"line":845},10,[238,847,806],{"class":248},[238,849,664],{"class":251},[238,851,254],{"class":248},[238,853,226],{"class":244},[238,855,165],{"class":248},[238,857,261],{"class":251},[238,859,254],{"class":248},[238,861,267],{"class":266},[238,863,864],{"class":248},"))));\n",[155,866,867,868,871],{},"Connection settings can also be built once with ",[162,869,870],{},"ConnectionOptions.builder()"," and shared by several clients:",[229,873,875],{"className":231,"code":874,"filename":233,"language":142,"meta":234,"style":234},"import com.configdirector.ConnectionOptions;\n\nConnectionOptions connection = ConnectionOptions.builder()\n    .mode(ConnectionMode.POLLING)\n    .pollingInterval(Duration.ofSeconds(30))\n    .build();\n\nConfigDirectorClient client = ConfigDirector.client(\n    \"YOUR-SERVER-SDK-KEY\",\n    options -> options.connection(connection));\n",[162,876,877,894,898,918,935,955,964,968,984,994],{"__ignoreMap":234},[238,878,879,881,883,885,887,889,892],{"class":240,"line":241},[238,880,305],{"class":304},[238,882,309],{"class":308},[238,884,165],{"class":248},[238,886,314],{"class":308},[238,888,165],{"class":248},[238,890,891],{"class":308},"ConnectionOptions",[238,893,322],{"class":248},[238,895,896],{"class":240,"line":325},[238,897,346],{"emptyLinePlaceholder":32},[238,899,900,902,905,907,910,912,915],{"class":240,"line":343},[238,901,891],{"class":308},[238,903,904],{"class":244}," connection ",[238,906,358],{"class":357},[238,908,909],{"class":244}," ConnectionOptions",[238,911,165],{"class":248},[238,913,914],{"class":251},"builder",[238,916,917],{"class":248},"()\n",[238,919,920,923,925,927,929,931,933],{"class":240,"line":349},[238,921,922],{"class":248},"    .",[238,924,609],{"class":251},[238,926,254],{"class":248},[238,928,729],{"class":244},[238,930,165],{"class":248},[238,932,652],{"class":244},[238,934,819],{"class":248},[238,936,937,939,941,943,945,947,949,951,953],{"class":240,"line":371},[238,938,922],{"class":248},[238,940,644],{"class":251},[238,942,254],{"class":248},[238,944,226],{"class":244},[238,946,165],{"class":248},[238,948,261],{"class":251},[238,950,254],{"class":248},[238,952,839],{"class":266},[238,954,842],{"class":248},[238,956,957,959,962],{"class":240,"line":388},[238,958,922],{"class":248},[238,960,961],{"class":251},"build",[238,963,441],{"class":248},[238,965,966],{"class":240,"line":427},[238,967,346],{"emptyLinePlaceholder":32},[238,969,970,972,974,976,978,980,982],{"class":240,"line":432},[238,971,338],{"class":308},[238,973,354],{"class":244},[238,975,358],{"class":357},[238,977,361],{"class":244},[238,979,165],{"class":248},[238,981,245],{"class":251},[238,983,368],{"class":248},[238,985,986,988,990,992],{"class":240,"line":822},[238,987,375],{"class":374},[238,989,379],{"class":378},[238,991,382],{"class":374},[238,993,385],{"class":248},[238,995,996,998,1000,1002,1004,1006,1008,1010],{"class":240,"line":845},[238,997,391],{"class":244},[238,999,395],{"class":394},[238,1001,398],{"class":244},[238,1003,165],{"class":248},[238,1005,596],{"class":251},[238,1007,254],{"class":248},[238,1009,596],{"class":244},[238,1011,270],{"class":248},[284,1013,1015],{"id":1014},"telemetry",[162,1016,1014],{},[155,1018,1019],{},"Telemetry tuning. It is unlikely these settings need to be adjusted. However, in cases where your application has a large number of evaluations per second, you can adjust these settings to tune the memory footprint and frequency of telemetry requests.",[155,1021,1022],{},"Keep in mind that ConfigDirector relies on these telemetry events to provide insights and features related to the configs being used.",[155,1024,1025],{},"The telemetry builder accepts the following optional values:",[603,1027,1028,1044],{},[197,1029,1030,1033],{},[162,1031,1032],{},"eventQueueLimit",[603,1034,1035,1038,1041],{},[197,1036,1037],{},"The size limit of telemetry event queues. If the size limit is reached before the events are flushed to the network, older events will be dropped.",[197,1039,1040],{},"ConfigDirector keeps a count of dropped events. If the number of dropped events is higher than 50% of the total events, ConfigDirector will issue a notification alert in the dashboard.",[197,1042,1043],{},"A number between 100 and 100,000. Defaults to 5,000.",[197,1045,1046,1049],{},[162,1047,1048],{},"flushInterval",[603,1050,1051,1054,1057],{},[197,1052,1053],{},"How often events are flushed and sent over the network.",[197,1055,1056],{},"Decrease this number if your application consistently captures a large number of events in short periods of time in order to reduce memory footprint from a large event queue.",[197,1058,1059],{},"Defaults to 30 seconds.",[229,1061,1063],{"className":231,"code":1062,"filename":233,"language":142,"meta":234,"style":234},"import java.time.Duration;\n\nConfigDirectorClient client = ConfigDirector.client(\n    \"YOUR-SERVER-SDK-KEY\",\n    options -> options.telemetry(telemetry -> telemetry\n        .eventQueueLimit(10_000)\n        .flushInterval(Duration.ofSeconds(15))));\n",[162,1064,1065,1081,1085,1101,1111,1133,1146],{"__ignoreMap":234},[238,1066,1067,1069,1071,1073,1075,1077,1079],{"class":240,"line":241},[238,1068,305],{"class":304},[238,1070,738],{"class":308},[238,1072,165],{"class":248},[238,1074,743],{"class":308},[238,1076,165],{"class":248},[238,1078,226],{"class":308},[238,1080,322],{"class":248},[238,1082,1083],{"class":240,"line":325},[238,1084,346],{"emptyLinePlaceholder":32},[238,1086,1087,1089,1091,1093,1095,1097,1099],{"class":240,"line":343},[238,1088,338],{"class":308},[238,1090,354],{"class":244},[238,1092,358],{"class":357},[238,1094,361],{"class":244},[238,1096,165],{"class":248},[238,1098,245],{"class":251},[238,1100,368],{"class":248},[238,1102,1103,1105,1107,1109],{"class":240,"line":349},[238,1104,375],{"class":374},[238,1106,379],{"class":378},[238,1108,382],{"class":374},[238,1110,385],{"class":248},[238,1112,1113,1115,1117,1119,1121,1123,1125,1128,1130],{"class":240,"line":371},[238,1114,391],{"class":244},[238,1116,395],{"class":394},[238,1118,398],{"class":244},[238,1120,165],{"class":248},[238,1122,1014],{"class":251},[238,1124,254],{"class":248},[238,1126,1127],{"class":244},"telemetry ",[238,1129,395],{"class":394},[238,1131,1132],{"class":244}," telemetry\n",[238,1134,1135,1137,1139,1141,1144],{"class":240,"line":388},[238,1136,806],{"class":248},[238,1138,1032],{"class":251},[238,1140,254],{"class":248},[238,1142,1143],{"class":266},"10_000",[238,1145,819],{"class":248},[238,1147,1148,1150,1152,1154,1156,1158,1160,1162,1165],{"class":240,"line":427},[238,1149,806],{"class":248},[238,1151,1048],{"class":251},[238,1153,254],{"class":248},[238,1155,226],{"class":244},[238,1157,165],{"class":248},[238,1159,261],{"class":251},[238,1161,254],{"class":248},[238,1163,1164],{"class":266},"15",[238,1166,864],{"class":248},[155,1168,1169,1170,1173],{},"A value outside the accepted range throws a ",[162,1171,1172],{},"ConfigDirectorValidationException"," when the client is built.",[272,1175,1177],{"id":1176},"hooks","Hooks",[155,1179,1180,1181,1184],{},"Hooks are events you can subscribe to in order to be notified of some key actions from the client. Each registration method takes a handler and returns a ",[162,1182,1183],{},"Subscription",", which cancels the registration when closed:",[229,1186,1188],{"className":231,"code":1187,"filename":233,"language":142,"meta":234,"style":234},"Subscription subscription = client.onConfigsUpdated(event -> System.out.println(event.keys()));\n\nsubscription.close(); \u002F\u002F Cancels the registration\n",[162,1189,1190,1240,1244],{"__ignoreMap":234},[238,1191,1192,1194,1197,1199,1202,1204,1207,1209,1212,1214,1217,1219,1222,1224,1227,1229,1232,1234,1237],{"class":240,"line":241},[238,1193,1183],{"class":308},[238,1195,1196],{"class":244}," subscription ",[238,1198,358],{"class":357},[238,1200,1201],{"class":244}," client",[238,1203,165],{"class":248},[238,1205,1206],{"class":251},"onConfigsUpdated",[238,1208,254],{"class":248},[238,1210,1211],{"class":244},"event ",[238,1213,395],{"class":394},[238,1215,1216],{"class":244}," System",[238,1218,165],{"class":248},[238,1220,1221],{"class":244},"out",[238,1223,165],{"class":248},[238,1225,1226],{"class":251},"println",[238,1228,254],{"class":248},[238,1230,1231],{"class":244},"event",[238,1233,165],{"class":248},[238,1235,1236],{"class":251},"keys",[238,1238,1239],{"class":248},"()));\n",[238,1241,1242],{"class":240,"line":325},[238,1243,346],{"emptyLinePlaceholder":32},[238,1245,1246,1249,1251,1253,1256],{"class":240,"line":343},[238,1247,1248],{"class":244},"subscription",[238,1250,165],{"class":248},[238,1252,171],{"class":251},[238,1254,1255],{"class":248},"();",[238,1257,1259],{"class":1258},"sutJx"," \u002F\u002F Cancels the registration\n",[155,1261,1262],{},"The following hooks are available:",[603,1264,1265,1277,1297],{},[197,1266,1267,1272],{},[162,1268,1271],{"className":1269},[1270],"font-semibold","onClientReady(Consumer\u003CClientReadyEvent>)",[603,1273,1274],{},[197,1275,1276],{},"Emitted when the client is initialized. When this event is emitted it means the client has received a payload from the ConfigDirector servers and is ready to evaluate configs. It is emitted once, and a handler registered after that point is never called.",[197,1278,1279,1283],{},[162,1280,1282],{"className":1281},[1270],"onConfigsUpdated(Consumer\u003CConfigsUpdatedEvent>)",[603,1284,1285,1288,1294],{},[197,1286,1287],{},"Emitted when a payload is received from the ConfigDirector servers with config data. It is emitted during initialization when an entire config payload is received. After initialization, it is emitted when updates are pushed from the server (or discovered via polling if that connection mode is used).",[197,1289,1290,1293],{},[162,1291,1292],{},"keys(): List\u003CString>"," - The config keys that were included in the payload from the server.",[197,1295,1296],{},"Handlers run on the transport thread, so one that blocks delays later updates.",[197,1298,1299,1303],{},[162,1300,1302],{"className":1301},[1270],"onConfigEvaluated(Consumer\u003CConfigEvaluatedEvent>)",[603,1304,1305,1311,1416],{},[197,1306,1307,1308,165],{},"Emitted whenever a config is evaluated. This includes calls to the getters and evaluations delivered to watchers via ",[162,1309,1310],{},"watch",[197,1312,1313,1316,1317,1320,1321],{},[162,1314,1315],{},"evaluation(): ConfigEvaluation"," - A ",[162,1318,1319],{},"ConfigEvaluation"," record containing the details of the evaluation:\n",[603,1322,1323,1329,1338,1348,1354,1406],{},[197,1324,1325,1328],{},[162,1326,1327],{},"key(): String"," - The config key that was evaluated",[197,1330,1331,1334,1335,1337],{},[162,1332,1333],{},"value(): Object"," - The value the config evaluated to, in the type the caller's default asked for. It can be the default value provided to the getter or to ",[162,1336,1310],{},". For example, if the config was evaluated before the client was initialized.",[197,1339,1340,1343,1344,1347],{},[162,1341,1342],{},"valueId(): String"," - The value ID, which is a stable hash of the value that can be used for analytics or other third parties rather than sending the ",[162,1345,1346],{},"value",". This can be useful for large values, like a JSON config, or to avoid disclosing the values themselves to third parties.",[197,1349,1350,1353],{},[162,1351,1352],{},"isDefault(): boolean"," - Whether or not the evaluation fell back to the default value provided in code.",[197,1355,1356,1359,1360,1363,1364,1367,1368],{},[162,1357,1358],{},"reason(): EvaluationReason"," - The reason for the evaluation resolution. In the case the config successfully evaluated based on server-provided targeting rules, it will be ",[162,1361,1362],{},"FOUND_MATCH",". If the evaluation had to fall back to the default value, the ",[162,1365,1366],{},"reason"," will encode why the fallback was required:\n",[603,1369,1370,1376,1382,1388,1394,1400],{},[197,1371,1372,1375],{},[162,1373,1374],{},"CLIENT_NOT_READY"," - The evaluation happened before the client finished initialization",[197,1377,1378,1381],{},[162,1379,1380],{},"CONFIG_STATE_MISSING"," - The requested config key was not present in the payload received from the server. This could be due to an incorrect config key, or a config that was not enabled to be available to client SDKs.",[197,1383,1384,1387],{},[162,1385,1386],{},"INVALID_NUMBER"," - The config was requested as a number but the value received from the server could not be converted to a number.",[197,1389,1390,1393],{},[162,1391,1392],{},"INVALID_BOOLEAN"," - The config was requested as a boolean but the value received from the server could not be converted to a boolean.",[197,1395,1396,1399],{},[162,1397,1398],{},"INVALID_JSON"," - The config was requested as JSON but the value received from the server could not be converted to a JSON object or array.",[197,1401,1402,1405],{},[162,1403,1404],{},"VALUE_MISSING"," - The config key was present in the payload received from the server, but it carried no value.",[197,1407,1408,1411,1412,1415],{},[162,1409,1410],{},"context(): Context"," - The user context that was provided to the evaluation function, or ",[162,1413,1414],{},"null"," if no context was provided.",[197,1417,1418],{},"Handlers run on the calling thread, so one that blocks delays the getter that triggered it.",[150,1420,1422],{"id":1421},"retrieve-config-values","Retrieve config values",[186,1424],{"name":1425},"sdks\u002Fjava\u002Fsimple-usage",[155,1427,1428],{},"The type a config is parsed as is decided by the getter you call. Each one takes the value to return when the config is missing, the service is unreachable, or the value will not convert to the requested type — so the default should always be the safe choice:",[603,1430,1431,1436,1441,1446,1451,1456],{},[197,1432,1433],{},[162,1434,1435],{},"getBoolean(String configKey, boolean defaultValue)",[197,1437,1438],{},[162,1439,1440],{},"getString(String configKey, String defaultValue)",[197,1442,1443],{},[162,1444,1445],{},"getInteger(String configKey, int defaultValue)",[197,1447,1448],{},[162,1449,1450],{},"getDouble(String configKey, double defaultValue)",[197,1452,1453],{},[162,1454,1455],{},"getJsonObject(String configKey, Map\u003CString, Object> defaultValue)",[197,1457,1458],{},[162,1459,1460],{},"getJsonArray(String configKey, List\u003CObject> defaultValue)",[155,1462,1463,1464,1467,1468,1470,1471,618,1474,618,1477,618,1480,618,1483,618,1486,618,1489,622,1492,1495],{},"There is also ",[162,1465,1466],{},"getValue",", the counterpart to ",[162,1469,1466],{}," in the other ConfigDirector SDKs. It takes the type from the default value, which must be a ",[162,1472,1473],{},"Boolean",[162,1475,1476],{},"String",[162,1478,1479],{},"Integer",[162,1481,1482],{},"Long",[162,1484,1485],{},"Double",[162,1487,1488],{},"Float",[162,1490,1491],{},"Map",[162,1493,1494],{},"List",", and must not be null:",[229,1497,1500],{"className":231,"code":1498,"filename":1499,"language":142,"meta":234,"style":234},"boolean newCheckout = client.getValue(\"new-checkout\", false);\nString theme = client.getValue(\"theme\", \"light\");\n","Main.java",[162,1501,1502,1536],{"__ignoreMap":234},[238,1503,1504,1507,1510,1512,1514,1516,1518,1520,1522,1525,1527,1529,1533],{"class":240,"line":241},[238,1505,1506],{"class":394},"boolean",[238,1508,1509],{"class":244}," newCheckout ",[238,1511,358],{"class":357},[238,1513,1201],{"class":244},[238,1515,165],{"class":248},[238,1517,1466],{"class":251},[238,1519,254],{"class":248},[238,1521,382],{"class":374},[238,1523,1524],{"class":378},"new-checkout",[238,1526,382],{"class":374},[238,1528,414],{"class":248},[238,1530,1532],{"class":1531},"s39Yj"," false",[238,1534,1535],{"class":248},");\n",[238,1537,1538,1540,1543,1545,1547,1549,1551,1553,1555,1558,1560,1562,1564,1567,1569],{"class":240,"line":325},[238,1539,1476],{"class":308},[238,1541,1542],{"class":244}," theme ",[238,1544,358],{"class":357},[238,1546,1201],{"class":244},[238,1548,165],{"class":248},[238,1550,1466],{"class":251},[238,1552,254],{"class":248},[238,1554,382],{"class":374},[238,1556,1557],{"class":378},"theme",[238,1559,382],{"class":374},[238,1561,414],{"class":248},[238,1563,417],{"class":374},[238,1565,1566],{"class":378},"light",[238,1568,382],{"class":374},[238,1570,1535],{"class":248},[1572,1573,1574,1575,165],"note",{},"Getters never throw when a config is missing or a value will not convert — they return your default instead. Which of those happened is reported through ",[162,1576,1577],{},"onConfigEvaluated",[272,1579,1581],{"id":1580},"evaluate-config-values-with-a-user-context","Evaluate config values with a user context",[1572,1583,1584],{},"Unlike client SDKs, the server SDKs are able to evaluate targeting rules for the given user context locally without additional network calls.",[155,1586,1587,1588,1591],{},"Every getter has an overload taking a ",[162,1589,1590],{},"Context"," as its last argument, which is what targeting rules are evaluated against. The same key can therefore resolve differently per user:",[229,1593,1595],{"className":231,"code":1594,"filename":1499,"language":142,"meta":234,"style":234},"import com.configdirector.Context;\n\nContext context = Context.builder()\n    .id(\"user-id\")\n    .name(\"Example User\")\n    .trait(\"region\", \"North America\")\n    .build();\n\nclient.getBoolean(\"my-boolean-config-key\", false, context);\n",[162,1596,1597,1613,1617,1635,1653,1671,1698,1706,1710],{"__ignoreMap":234},[238,1598,1599,1601,1603,1605,1607,1609,1611],{"class":240,"line":241},[238,1600,305],{"class":304},[238,1602,309],{"class":308},[238,1604,165],{"class":248},[238,1606,314],{"class":308},[238,1608,165],{"class":248},[238,1610,1590],{"class":308},[238,1612,322],{"class":248},[238,1614,1615],{"class":240,"line":325},[238,1616,346],{"emptyLinePlaceholder":32},[238,1618,1619,1621,1624,1626,1629,1631,1633],{"class":240,"line":343},[238,1620,1590],{"class":308},[238,1622,1623],{"class":244}," context ",[238,1625,358],{"class":357},[238,1627,1628],{"class":244}," Context",[238,1630,165],{"class":248},[238,1632,914],{"class":251},[238,1634,917],{"class":248},[238,1636,1637,1639,1642,1644,1646,1649,1651],{"class":240,"line":349},[238,1638,922],{"class":248},[238,1640,1641],{"class":251},"id",[238,1643,254],{"class":248},[238,1645,382],{"class":374},[238,1647,1648],{"class":378},"user-id",[238,1650,382],{"class":374},[238,1652,819],{"class":248},[238,1654,1655,1657,1660,1662,1664,1667,1669],{"class":240,"line":371},[238,1656,922],{"class":248},[238,1658,1659],{"class":251},"name",[238,1661,254],{"class":248},[238,1663,382],{"class":374},[238,1665,1666],{"class":378},"Example User",[238,1668,382],{"class":374},[238,1670,819],{"class":248},[238,1672,1673,1675,1678,1680,1682,1685,1687,1689,1691,1694,1696],{"class":240,"line":388},[238,1674,922],{"class":248},[238,1676,1677],{"class":251},"trait",[238,1679,254],{"class":248},[238,1681,382],{"class":374},[238,1683,1684],{"class":378},"region",[238,1686,382],{"class":374},[238,1688,414],{"class":248},[238,1690,417],{"class":374},[238,1692,1693],{"class":378},"North America",[238,1695,382],{"class":374},[238,1697,819],{"class":248},[238,1699,1700,1702,1704],{"class":240,"line":427},[238,1701,922],{"class":248},[238,1703,961],{"class":251},[238,1705,441],{"class":248},[238,1707,1708],{"class":240,"line":432},[238,1709,346],{"emptyLinePlaceholder":32},[238,1711,1712,1714,1716,1719,1721,1723,1726,1728,1730,1732,1734,1737],{"class":240,"line":822},[238,1713,245],{"class":244},[238,1715,165],{"class":248},[238,1717,1718],{"class":251},"getBoolean",[238,1720,254],{"class":248},[238,1722,382],{"class":374},[238,1724,1725],{"class":378},"my-boolean-config-key",[238,1727,382],{"class":374},[238,1729,414],{"class":248},[238,1731,1532],{"class":1531},[238,1733,414],{"class":248},[238,1735,1736],{"class":244}," context",[238,1738,1535],{"class":248},[155,1740,1741,1743,1744,1747],{},[162,1742,1590],{}," is built with ",[162,1745,1746],{},"Context.builder()"," and accepts the following:",[603,1749,1750,1759,1768,1803],{},[197,1751,1752,1754],{},[162,1753,1641],{},[603,1755,1756],{},[197,1757,1758],{},"The user's identifier. It decides their bucket in a percentage rollout, so changing it can move a user into a different percentile. If it is not provided, a percentage rollout assigns an unstable bucket.",[197,1760,1761,1763],{},[162,1762,1659],{},[603,1764,1765],{},[197,1766,1767],{},"The user's display name.",[197,1769,1770,1773,1774,1777],{},[162,1771,1772],{},"trait(String key, Object value)"," \u002F ",[162,1775,1776],{},"traits(Map\u003CString, Object> traits)",[603,1778,1779,1794],{},[197,1780,1781,1782,618,1784,618,1787,618,1789,618,1791,1793],{},"Arbitrary traits which can be referenced in targeting rules. Values are JSON-shaped: ",[162,1783,1476],{},[162,1785,1786],{},"Number",[162,1788,1473],{},[162,1790,1494],{},[162,1792,1491],{},", or null. Anything else has no text form and will not match a targeting rule.",[197,1795,1796,1798,1799,1802],{},[162,1797,1677],{}," adds a single trait, keeping the rest. ",[162,1800,1801],{},"traits"," replaces every trait set so far.",[197,1804,1805,1808],{},[162,1806,1807],{},"anonymous",[603,1809,1810],{},[197,1811,1812],{},"Keeps the context out of the dashboard: it is evaluated but never persisted, and telemetry reports neither the context nor its id.",[155,1814,1815,1817],{},[162,1816,1310],{}," accepts four arguments, the first is the config key, the second argument is the default value, the third argument is a handler that will be executed when the config value is updated, and the fourth and optional argument is a user context:",[229,1819,1821],{"className":231,"code":1820,"filename":1499,"language":142,"meta":234,"style":234},"import com.configdirector.Context;\nimport com.configdirector.Subscription;\n\nSubscription subscription = client.watch(\n    \"new-checkout\",\n    false,\n    value -> System.out.println(\"new-checkout is now \" + value),\n    Context.builder()\n        .id(\"user-id\")\n        .name(\"Example User\")\n        .trait(\"region\", \"North America\")\n        .build());\n",[162,1822,1823,1839,1855,1859,1875,1885,1892,1927,1938,1954,1970,1995],{"__ignoreMap":234},[238,1824,1825,1827,1829,1831,1833,1835,1837],{"class":240,"line":241},[238,1826,305],{"class":304},[238,1828,309],{"class":308},[238,1830,165],{"class":248},[238,1832,314],{"class":308},[238,1834,165],{"class":248},[238,1836,1590],{"class":308},[238,1838,322],{"class":248},[238,1840,1841,1843,1845,1847,1849,1851,1853],{"class":240,"line":325},[238,1842,305],{"class":304},[238,1844,309],{"class":308},[238,1846,165],{"class":248},[238,1848,314],{"class":308},[238,1850,165],{"class":248},[238,1852,1183],{"class":308},[238,1854,322],{"class":248},[238,1856,1857],{"class":240,"line":343},[238,1858,346],{"emptyLinePlaceholder":32},[238,1860,1861,1863,1865,1867,1869,1871,1873],{"class":240,"line":349},[238,1862,1183],{"class":308},[238,1864,1196],{"class":244},[238,1866,358],{"class":357},[238,1868,1201],{"class":244},[238,1870,165],{"class":248},[238,1872,1310],{"class":251},[238,1874,368],{"class":248},[238,1876,1877,1879,1881,1883],{"class":240,"line":371},[238,1878,375],{"class":374},[238,1880,1524],{"class":378},[238,1882,382],{"class":374},[238,1884,385],{"class":248},[238,1886,1887,1890],{"class":240,"line":388},[238,1888,1889],{"class":1531},"    false",[238,1891,385],{"class":248},[238,1893,1894,1897,1899,1901,1903,1905,1907,1909,1911,1913,1916,1918,1921,1924],{"class":240,"line":427},[238,1895,1896],{"class":244},"    value ",[238,1898,395],{"class":394},[238,1900,1216],{"class":244},[238,1902,165],{"class":248},[238,1904,1221],{"class":244},[238,1906,165],{"class":248},[238,1908,1226],{"class":251},[238,1910,254],{"class":248},[238,1912,382],{"class":374},[238,1914,1915],{"class":378},"new-checkout is now ",[238,1917,382],{"class":374},[238,1919,1920],{"class":357}," +",[238,1922,1923],{"class":244}," value",[238,1925,1926],{"class":248},"),\n",[238,1928,1929,1932,1934,1936],{"class":240,"line":432},[238,1930,1931],{"class":244},"    Context",[238,1933,165],{"class":248},[238,1935,914],{"class":251},[238,1937,917],{"class":248},[238,1939,1940,1942,1944,1946,1948,1950,1952],{"class":240,"line":822},[238,1941,806],{"class":248},[238,1943,1641],{"class":251},[238,1945,254],{"class":248},[238,1947,382],{"class":374},[238,1949,1648],{"class":378},[238,1951,382],{"class":374},[238,1953,819],{"class":248},[238,1955,1956,1958,1960,1962,1964,1966,1968],{"class":240,"line":845},[238,1957,806],{"class":248},[238,1959,1659],{"class":251},[238,1961,254],{"class":248},[238,1963,382],{"class":374},[238,1965,1666],{"class":378},[238,1967,382],{"class":374},[238,1969,819],{"class":248},[238,1971,1973,1975,1977,1979,1981,1983,1985,1987,1989,1991,1993],{"class":240,"line":1972},11,[238,1974,806],{"class":248},[238,1976,1677],{"class":251},[238,1978,254],{"class":248},[238,1980,382],{"class":374},[238,1982,1684],{"class":378},[238,1984,382],{"class":374},[238,1986,414],{"class":248},[238,1988,417],{"class":374},[238,1990,1693],{"class":378},[238,1992,382],{"class":374},[238,1994,819],{"class":248},[238,1996,1998,2000,2002],{"class":240,"line":1997},12,[238,1999,806],{"class":248},[238,2001,961],{"class":251},[238,2003,2004],{"class":248},"());\n",[150,2006,2008],{"id":2007},"other-useful-client-features","Other useful client features",[155,2010,2011],{},"The client provides additional methods.",[272,2013,2015],{"id":2014},"isready",[162,2016,222],{},[155,2018,2019,2020,2023,2024,2027],{},"Returns a boolean indicating if the client has received config state and is ready to evaluate configs. It is initially ",[162,2021,2022],{},"false"," and becomes ",[162,2025,2026],{},"true"," once the first config state arrives. Until it does, every getter returns its default.",[272,2029,2031],{"id":2030},"isclosed",[162,2032,2033],{},"isClosed",[155,2035,2036,2037,2039],{},"Returns a boolean indicating if ",[162,2038,171],{}," has been called. A closed client cannot be reopened.",[272,2041,2043],{"id":2042},"getallconfigs",[162,2044,2045],{},"getAllConfigs",[155,2047,2048,2049,2052,2053,2055],{},"Returns every config the client currently holds as a ",[162,2050,2051],{},"Map\u003CString, ConfigState>",", evaluated but before type parsing. It optionally accepts a ",[162,2054,1590],{}," and a list of config keys to restrict the result to.",[155,2057,2058],{},"This is intended for handing state to a client SDK to hydrate with. It records no telemetry, since the SDK that receives the state reports its own evaluations.",[272,2060,2062],{"id":2061},"unwatch",[162,2063,2061],{},[155,2065,2066],{},"Cancels every watch on one config key.",[272,2068,2070],{"id":2069},"unwatchall",[162,2071,2072],{},"unwatchAll",[155,2074,2075],{},"Cancels every watch on every config key.",[272,2077,2078],{"id":171},[162,2079,171],{},[155,2081,2082],{},"Closes all connections to ConfigDirector services, reports whatever telemetry is pending, and cancels every watch and event handler. Calling it twice is harmless.",[155,2084,2085,2086,2088,2089,2091,2092,2095],{},"Only call ",[162,2087,171],{}," when your application shuts down and it will no longer make use of the client instance. ",[162,2090,338],{}," implements ",[162,2093,2094],{},"AutoCloseable",", so in a container such as Spring it is enough to let the container own the lifecycle:",[229,2097,2100],{"className":231,"code":2098,"filename":2099,"language":142,"meta":234,"style":234},"@Bean(destroyMethod = \"close\")\npublic ConfigDirectorClient configDirectorClient() {\n  ConfigDirectorClient client = ConfigDirector.client(System.getenv(\"CONFIGDIRECTOR_SERVER_KEY\"));\n  client.initialize();\n  return client;\n}\n","ConfigDirectorConfiguration.java",[162,2101,2102,2127,2144,2180,2191,2201],{"__ignoreMap":234},[238,2103,2104,2107,2110,2112,2116,2119,2121,2123,2125],{"class":240,"line":241},[238,2105,2106],{"class":248},"@",[238,2108,2109],{"class":394},"Bean",[238,2111,254],{"class":248},[238,2113,2115],{"class":2114},"sZMiF","destroyMethod",[238,2117,2118],{"class":357}," =",[238,2120,417],{"class":374},[238,2122,171],{"class":378},[238,2124,382],{"class":374},[238,2126,819],{"class":248},[238,2128,2129,2132,2135,2138,2141],{"class":240,"line":325},[238,2130,2131],{"class":394},"public",[238,2133,2134],{"class":308}," ConfigDirectorClient",[238,2136,2137],{"class":251}," configDirectorClient",[238,2139,2140],{"class":248},"()",[238,2142,2143],{"class":248}," {\n",[238,2145,2146,2149,2151,2153,2155,2157,2159,2161,2164,2166,2169,2171,2173,2176,2178],{"class":240,"line":343},[238,2147,2148],{"class":308},"  ConfigDirectorClient",[238,2150,354],{"class":244},[238,2152,358],{"class":357},[238,2154,361],{"class":244},[238,2156,165],{"class":248},[238,2158,245],{"class":251},[238,2160,254],{"class":248},[238,2162,2163],{"class":244},"System",[238,2165,165],{"class":248},[238,2167,2168],{"class":251},"getenv",[238,2170,254],{"class":248},[238,2172,382],{"class":374},[238,2174,2175],{"class":378},"CONFIGDIRECTOR_SERVER_KEY",[238,2177,382],{"class":374},[238,2179,270],{"class":248},[238,2181,2182,2185,2187,2189],{"class":240,"line":349},[238,2183,2184],{"class":244},"  client",[238,2186,165],{"class":248},[238,2188,218],{"class":251},[238,2190,441],{"class":248},[238,2192,2193,2197,2199],{"class":240,"line":371},[238,2194,2196],{"class":2195},"sVHd0","  return",[238,2198,1201],{"class":244},[238,2200,322],{"class":248},[238,2202,2203],{"class":240,"line":388},[238,2204,2205],{"class":248},"}\n",[2207,2208,2209],"style",{},"html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_bVq, html code.shiki .s_bVq{--shiki-light:#9C3EDA;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sQzsp, html code.shiki .sQzsp{--shiki-light:#E53935;--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .s9AJx, html code.shiki .s9AJx{--shiki-light:#9C3EDA;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}",{"title":234,"searchDepth":325,"depth":325,"links":2211},[2212,2213,2214,2218,2221],{"id":152,"depth":325,"text":153},{"id":175,"depth":325,"text":176},{"id":191,"depth":325,"text":192,"children":2215},[2216,2217],{"id":274,"depth":343,"text":275},{"id":1176,"depth":343,"text":1177},{"id":1421,"depth":325,"text":1422,"children":2219},[2220],{"id":1580,"depth":343,"text":1581},{"id":2007,"depth":325,"text":2008,"children":2222},[2223,2224,2225,2226,2227,2228],{"id":2014,"depth":343,"text":222},{"id":2030,"depth":343,"text":2033},{"id":2042,"depth":343,"text":2045},{"id":2061,"depth":343,"text":2061},{"id":2069,"depth":343,"text":2072},{"id":171,"depth":343,"text":171},"md",null,{},{"title":119,"icon":122},{"title":135,"description":234},"nuR_2g0gcMQnxQl2vlPYGn0eiPkCHS5L2VBqnjAtnS8",[2236,2237],{"title":114,"path":115,"stem":116,"description":234,"icon":117,"children":-1},{"title":129,"path":130,"stem":131,"description":234,"icon":132,"children":-1},{"id":2239,"title":2240,"body":2241,"description":234,"extension":2229,"links":2230,"meta":2393,"navigation":6,"path":2394,"seo":2395,"stem":2396,"__hash__":2397},"docs\u002F_partials\u002Fsdks\u002Fjava\u002Finstall.md","Install",{"type":137,"value":2242,"toc":2391},[2243,2388],[2244,2245,2246,2277,2308],"code-group",{},[229,2247,2252],{"className":2248,"code":2249,"filename":2250,"language":2251,"meta":234,"style":234},"language-kotlin shiki shiki-themes material-theme-lighter github-light github-dark","dependencies {\n    implementation(\"com.configdirector:configdirector-server-sdk:0.1.0\")\n}\n","build.gradle.kts","kotlin",[162,2253,2254,2261,2273],{"__ignoreMap":234},[238,2255,2256,2259],{"class":240,"line":241},[238,2257,2258],{"class":251},"dependencies",[238,2260,2143],{"class":244},[238,2262,2263,2266,2268,2271],{"class":240,"line":325},[238,2264,2265],{"class":251},"    implementation",[238,2267,254],{"class":244},[238,2269,2270],{"class":378},"\"com.configdirector:configdirector-server-sdk:0.1.0\"",[238,2272,819],{"class":244},[238,2274,2275],{"class":240,"line":343},[238,2276,2205],{"class":244},[229,2278,2283],{"className":2279,"code":2280,"filename":2281,"language":2282,"meta":234,"style":234},"language-groovy shiki shiki-themes material-theme-lighter github-light github-dark","dependencies {\n    implementation 'com.configdirector:configdirector-server-sdk:0.1.0'\n}\n","build.gradle","groovy",[162,2284,2285,2290,2304],{"__ignoreMap":234},[238,2286,2287],{"class":240,"line":241},[238,2288,2289],{"class":244},"dependencies {\n",[238,2291,2292,2295,2298,2301],{"class":240,"line":325},[238,2293,2294],{"class":244},"    implementation ",[238,2296,2297],{"class":374},"'",[238,2299,2300],{"class":378},"com.configdirector:configdirector-server-sdk:0.1.0",[238,2302,2303],{"class":374},"'\n",[238,2305,2306],{"class":240,"line":343},[238,2307,2205],{"class":244},[229,2309,2312],{"className":456,"code":2310,"filename":2311,"language":459,"meta":234,"style":234},"\u003Cdependency>\n  \u003CgroupId>com.configdirector\u003C\u002FgroupId>\n  \u003CartifactId>configdirector-server-sdk\u003C\u002FartifactId>\n  \u003Cversion>0.1.0\u003C\u002Fversion>\n\u003C\u002Fdependency>\n","pom.xml",[162,2313,2314,2324,2344,2362,2380],{"__ignoreMap":234},[238,2315,2316,2318,2321],{"class":240,"line":241},[238,2317,466],{"class":248},[238,2319,2320],{"class":469},"dependency",[238,2322,2323],{"class":248},">\n",[238,2325,2326,2329,2332,2335,2337,2340,2342],{"class":240,"line":325},[238,2327,2328],{"class":248},"  \u003C",[238,2330,2331],{"class":469},"groupId",[238,2333,2334],{"class":248},">",[238,2336,452],{"class":244},[238,2338,2339],{"class":248},"\u003C\u002F",[238,2341,2331],{"class":469},[238,2343,2323],{"class":248},[238,2345,2346,2348,2351,2353,2356,2358,2360],{"class":240,"line":343},[238,2347,2328],{"class":248},[238,2349,2350],{"class":469},"artifactId",[238,2352,2334],{"class":248},[238,2354,2355],{"class":244},"configdirector-server-sdk",[238,2357,2339],{"class":248},[238,2359,2350],{"class":469},[238,2361,2323],{"class":248},[238,2363,2364,2366,2369,2371,2374,2376,2378],{"class":240,"line":349},[238,2365,2328],{"class":248},[238,2367,2368],{"class":469},"version",[238,2370,2334],{"class":248},[238,2372,2373],{"class":244},"0.1.0",[238,2375,2339],{"class":248},[238,2377,2368],{"class":469},[238,2379,2323],{"class":248},[238,2381,2382,2384,2386],{"class":240,"line":371},[238,2383,2339],{"class":248},[238,2385,2320],{"class":469},[238,2387,2323],{"class":248},[2207,2389,2390],{},"html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sQzsp, html code.shiki .sQzsp{--shiki-light:#E53935;--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":234,"searchDepth":325,"depth":325,"links":2392},[],{},"\u002F_partials\u002Fsdks\u002Fjava\u002Finstall",{"description":234},"_partials\u002Fsdks\u002Fjava\u002Finstall","Ai0akDkbrZx23Tc5QLdhnTfj_IMWwhg02C-VbKw2pJs",{"id":2399,"title":2400,"body":2401,"description":234,"extension":2229,"links":2230,"meta":2518,"navigation":6,"path":2519,"seo":2520,"stem":2521,"__hash__":2522},"docs\u002F_partials\u002Fsdks\u002Fjava\u002Fconfigure.md","Configure",{"type":137,"value":2402,"toc":2516},[2403,2507,2513],[229,2404,2406],{"className":231,"code":2405,"filename":233,"language":142,"meta":234,"style":234},"import com.configdirector.ConfigDirector;\nimport com.configdirector.ConfigDirectorClient;\n\n\u002F\u002F IMPORTANT: Do not commit the server SDK key to your source code, it is a secret value.\n\u002F\u002F Building the client makes no network calls.\nConfigDirectorClient client = ConfigDirector.client(\"YOUR-SERVER-SDK-KEY\");\n\n\u002F\u002F Blocks until the client is initialized or it times out.\n\u002F\u002F If initialization times out, the client will continue attempting to\n\u002F\u002F initialize in the background.\nclient.initialize();\n",[162,2407,2408,2424,2440,2444,2449,2454,2478,2482,2487,2492,2497],{"__ignoreMap":234},[238,2409,2410,2412,2414,2416,2418,2420,2422],{"class":240,"line":241},[238,2411,305],{"class":304},[238,2413,309],{"class":308},[238,2415,165],{"class":248},[238,2417,314],{"class":308},[238,2419,165],{"class":248},[238,2421,319],{"class":308},[238,2423,322],{"class":248},[238,2425,2426,2428,2430,2432,2434,2436,2438],{"class":240,"line":325},[238,2427,305],{"class":304},[238,2429,309],{"class":308},[238,2431,165],{"class":248},[238,2433,314],{"class":308},[238,2435,165],{"class":248},[238,2437,338],{"class":308},[238,2439,322],{"class":248},[238,2441,2442],{"class":240,"line":343},[238,2443,346],{"emptyLinePlaceholder":32},[238,2445,2446],{"class":240,"line":349},[238,2447,2448],{"class":1258},"\u002F\u002F IMPORTANT: Do not commit the server SDK key to your source code, it is a secret value.\n",[238,2450,2451],{"class":240,"line":371},[238,2452,2453],{"class":1258},"\u002F\u002F Building the client makes no network calls.\n",[238,2455,2456,2458,2460,2462,2464,2466,2468,2470,2472,2474,2476],{"class":240,"line":388},[238,2457,338],{"class":308},[238,2459,354],{"class":244},[238,2461,358],{"class":357},[238,2463,361],{"class":244},[238,2465,165],{"class":248},[238,2467,245],{"class":251},[238,2469,254],{"class":248},[238,2471,382],{"class":374},[238,2473,379],{"class":378},[238,2475,382],{"class":374},[238,2477,1535],{"class":248},[238,2479,2480],{"class":240,"line":427},[238,2481,346],{"emptyLinePlaceholder":32},[238,2483,2484],{"class":240,"line":432},[238,2485,2486],{"class":1258},"\u002F\u002F Blocks until the client is initialized or it times out.\n",[238,2488,2489],{"class":240,"line":822},[238,2490,2491],{"class":1258},"\u002F\u002F If initialization times out, the client will continue attempting to\n",[238,2493,2494],{"class":240,"line":845},[238,2495,2496],{"class":1258},"\u002F\u002F initialize in the background.\n",[238,2498,2499,2501,2503,2505],{"class":240,"line":1972},[238,2500,245],{"class":244},[238,2502,165],{"class":248},[238,2504,218],{"class":251},[238,2506,441],{"class":248},[155,2508,2509,2510,2512],{},"The client is thread safe. Create one at startup, share it for the lifetime of the process, and call ",[162,2511,171],{}," on shutdown.",[2207,2514,2515],{},"html pre.shiki code .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_bVq, html code.shiki .s_bVq{--shiki-light:#9C3EDA;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":234,"searchDepth":325,"depth":325,"links":2517},[],{},"\u002F_partials\u002Fsdks\u002Fjava\u002Fconfigure",{"description":234},"_partials\u002Fsdks\u002Fjava\u002Fconfigure","SnFRY83EfbHmpFT8Wk-WkSUGTA7U3c1WrwpFSQdtj-M",{"id":2524,"title":2525,"body":2526,"description":2841,"extension":2229,"links":2230,"meta":2842,"navigation":6,"path":2843,"seo":2844,"stem":2845,"__hash__":2846},"docs\u002F_partials\u002Fsdks\u002Fjava\u002Fsimple-usage.md","Simple Usage",{"type":137,"value":2527,"toc":2839},[2528,2534,2836],[155,2529,2530,2531,2533],{},"Retrieve config values via the typed getters, and subscribe to updates via ",[162,2532,1310],{},". The first argument is the config key and the second is the default value, which is returned if the config is not available or cannot be parsed as the given type:",[229,2535,2537],{"className":231,"code":2536,"filename":1499,"language":142,"meta":234,"style":234},"import com.configdirector.Subscription;\nimport java.util.Map;\n\n\u002F\u002F Retrieve config values\nint retries = client.getInteger(\"max-retries\", 3);\nString theme = client.getString(\"theme\", \"light\");\nboolean newCheckout = client.getBoolean(\"new-checkout\", false);\nMap\u003CString, Object> limits = client.getJsonObject(\"rate-limits\", Map.of(\"per_minute\", 60)); \u002F\u002F JSON config\n\n\u002F\u002F Watch for config updates\nSubscription subscription = client.watch(\n    \"new-checkout\",\n    false,\n    value -> System.out.println(\"new-checkout is now \" + value));\n\n\u002F\u002F Call close when the subscription is no longer needed\nsubscription.close();\n",[162,2538,2539,2555,2572,2576,2581,2614,2647,2675,2741,2745,2750,2766,2776,2783,2814,2819,2825],{"__ignoreMap":234},[238,2540,2541,2543,2545,2547,2549,2551,2553],{"class":240,"line":241},[238,2542,305],{"class":304},[238,2544,309],{"class":308},[238,2546,165],{"class":248},[238,2548,314],{"class":308},[238,2550,165],{"class":248},[238,2552,1183],{"class":308},[238,2554,322],{"class":248},[238,2556,2557,2559,2561,2563,2566,2568,2570],{"class":240,"line":325},[238,2558,305],{"class":304},[238,2560,738],{"class":308},[238,2562,165],{"class":248},[238,2564,2565],{"class":308},"util",[238,2567,165],{"class":248},[238,2569,1491],{"class":308},[238,2571,322],{"class":248},[238,2573,2574],{"class":240,"line":343},[238,2575,346],{"emptyLinePlaceholder":32},[238,2577,2578],{"class":240,"line":349},[238,2579,2580],{"class":1258},"\u002F\u002F Retrieve config values\n",[238,2582,2583,2586,2589,2591,2593,2595,2598,2600,2602,2605,2607,2609,2612],{"class":240,"line":371},[238,2584,2585],{"class":394},"int",[238,2587,2588],{"class":244}," retries ",[238,2590,358],{"class":357},[238,2592,1201],{"class":244},[238,2594,165],{"class":248},[238,2596,2597],{"class":251},"getInteger",[238,2599,254],{"class":248},[238,2601,382],{"class":374},[238,2603,2604],{"class":378},"max-retries",[238,2606,382],{"class":374},[238,2608,414],{"class":248},[238,2610,2611],{"class":266}," 3",[238,2613,1535],{"class":248},[238,2615,2616,2618,2620,2622,2624,2626,2629,2631,2633,2635,2637,2639,2641,2643,2645],{"class":240,"line":388},[238,2617,1476],{"class":308},[238,2619,1542],{"class":244},[238,2621,358],{"class":357},[238,2623,1201],{"class":244},[238,2625,165],{"class":248},[238,2627,2628],{"class":251},"getString",[238,2630,254],{"class":248},[238,2632,382],{"class":374},[238,2634,1557],{"class":378},[238,2636,382],{"class":374},[238,2638,414],{"class":248},[238,2640,417],{"class":374},[238,2642,1566],{"class":378},[238,2644,382],{"class":374},[238,2646,1535],{"class":248},[238,2648,2649,2651,2653,2655,2657,2659,2661,2663,2665,2667,2669,2671,2673],{"class":240,"line":427},[238,2650,1506],{"class":394},[238,2652,1509],{"class":244},[238,2654,358],{"class":357},[238,2656,1201],{"class":244},[238,2658,165],{"class":248},[238,2660,1718],{"class":251},[238,2662,254],{"class":248},[238,2664,382],{"class":374},[238,2666,1524],{"class":378},[238,2668,382],{"class":374},[238,2670,414],{"class":248},[238,2672,1532],{"class":1531},[238,2674,1535],{"class":248},[238,2676,2677,2679,2681,2683,2685,2688,2690,2693,2695,2697,2699,2702,2704,2706,2709,2711,2713,2716,2718,2721,2723,2725,2728,2730,2732,2735,2738],{"class":240,"line":432},[238,2678,1491],{"class":308},[238,2680,466],{"class":248},[238,2682,1476],{"class":394},[238,2684,414],{"class":248},[238,2686,2687],{"class":394}," Object",[238,2689,2334],{"class":248},[238,2691,2692],{"class":244}," limits ",[238,2694,358],{"class":357},[238,2696,1201],{"class":244},[238,2698,165],{"class":248},[238,2700,2701],{"class":251},"getJsonObject",[238,2703,254],{"class":248},[238,2705,382],{"class":374},[238,2707,2708],{"class":378},"rate-limits",[238,2710,382],{"class":374},[238,2712,414],{"class":248},[238,2714,2715],{"class":244}," Map",[238,2717,165],{"class":248},[238,2719,2720],{"class":251},"of",[238,2722,254],{"class":248},[238,2724,382],{"class":374},[238,2726,2727],{"class":378},"per_minute",[238,2729,382],{"class":374},[238,2731,414],{"class":248},[238,2733,2734],{"class":266}," 60",[238,2736,2737],{"class":248},"));",[238,2739,2740],{"class":1258}," \u002F\u002F JSON config\n",[238,2742,2743],{"class":240,"line":822},[238,2744,346],{"emptyLinePlaceholder":32},[238,2746,2747],{"class":240,"line":845},[238,2748,2749],{"class":1258},"\u002F\u002F Watch for config updates\n",[238,2751,2752,2754,2756,2758,2760,2762,2764],{"class":240,"line":1972},[238,2753,1183],{"class":308},[238,2755,1196],{"class":244},[238,2757,358],{"class":357},[238,2759,1201],{"class":244},[238,2761,165],{"class":248},[238,2763,1310],{"class":251},[238,2765,368],{"class":248},[238,2767,2768,2770,2772,2774],{"class":240,"line":1997},[238,2769,375],{"class":374},[238,2771,1524],{"class":378},[238,2773,382],{"class":374},[238,2775,385],{"class":248},[238,2777,2779,2781],{"class":240,"line":2778},13,[238,2780,1889],{"class":1531},[238,2782,385],{"class":248},[238,2784,2786,2788,2790,2792,2794,2796,2798,2800,2802,2804,2806,2808,2810,2812],{"class":240,"line":2785},14,[238,2787,1896],{"class":244},[238,2789,395],{"class":394},[238,2791,1216],{"class":244},[238,2793,165],{"class":248},[238,2795,1221],{"class":244},[238,2797,165],{"class":248},[238,2799,1226],{"class":251},[238,2801,254],{"class":248},[238,2803,382],{"class":374},[238,2805,1915],{"class":378},[238,2807,382],{"class":374},[238,2809,1920],{"class":357},[238,2811,1923],{"class":244},[238,2813,270],{"class":248},[238,2815,2817],{"class":240,"line":2816},15,[238,2818,346],{"emptyLinePlaceholder":32},[238,2820,2822],{"class":240,"line":2821},16,[238,2823,2824],{"class":1258},"\u002F\u002F Call close when the subscription is no longer needed\n",[238,2826,2828,2830,2832,2834],{"class":240,"line":2827},17,[238,2829,1248],{"class":244},[238,2831,165],{"class":248},[238,2833,171],{"class":251},[238,2835,441],{"class":248},[2207,2837,2838],{},"html pre.shiki code .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_bVq, html code.shiki .s_bVq{--shiki-light:#9C3EDA;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":234,"searchDepth":325,"depth":325,"links":2840},[],"Retrieve config values via the typed getters, and subscribe to updates via watch. The first argument is the config key and the second is the default value, which is returned if the config is not available or cannot be parsed as the given type:",{},"\u002F_partials\u002Fsdks\u002Fjava\u002Fsimple-usage",{"description":2841},"_partials\u002Fsdks\u002Fjava\u002Fsimple-usage","TIh9VO5Vli-FFPg8MjHRmEeqc0y554xFgrLWPKwm3gw",1787358914203]