{"id":3686,"date":"2019-01-07T18:17:20","date_gmt":"2019-01-07T10:17:20","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=3686"},"modified":"2019-01-07T18:21:47","modified_gmt":"2019-01-07T10:21:47","slug":"%e4%b8%80%e4%b8%aa-arrayblockingqueue-%e4%b8%8d%e5%bd%93%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%af%bc%e8%87%b4%e5%85%ac%e5%8f%b8%e6%8d%9f%e5%a4%b1%e5%87%a0%e7%99%be%e4%b8%87%ef%bc%81","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=3686","title":{"rendered":"\u4e00\u4e2a ArrayBlockingQueue \u4e0d\u5f53\u4f7f\u7528\uff0c\u5bfc\u81f4\u516c\u53f8\u635f\u5931\u51e0\u767e\u4e07\uff01"},"content":{"rendered":"<p>\n\t\u6211\u4eec\u4e3a\u4ec0\u4e48\u8981\u62db\u9ad8\u7ea7\u7a0b\u5e8f\u5458\u5462\uff1f\u56e0\u4e3a\u9ad8\u7ea7\u7a0b\u5e8f\u5458\u5199\u7684 bug \u53ef\u80fd\u66f4\u5c11\uff0c\u5728\u8c03\u7528 api \u7684\u65f6\u5019\uff0c\u72af\u9519\u7684\u6982\u7387\u66f4\u5c0f\u3002\u4f46\u662f\u5e76\u4e0d\u610f\u5473\u8fd9\u9ad8\u7ea7\u7a0b\u5e8f\u5458\u5c31\u4e0d\u72af\u9519\u3002\u4eca\u5929\u6211\u4eec\u5c31\u4e00\u8d77\u6765\u5206\u4eab\u4e00\u4e2a\u7531\u4e8e ArrayBlockingQueue \u4f7f\u7528\u4e0d\u5f53\uff0c\u5bfc\u81f4\u516c\u53f8\u635f\u5931\u51e0\u767e\u4e07\u7684\u6848\u4f8b\uff01\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"ArrayBlockingQueue \u6559\u7a0b\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/wx1.sinaimg.cn\/large\/8fa5dcfcgy1fyy6xuoza5j20c50a5wgb.jpg\" style=\"width: 437px;height: 365px\" \/>\n<\/p>\n<p>\n\t\u6839\u636e ArrayBlockingQueue \u7684\u540d\u5b57\u6211\u4eec\u90fd\u53ef\u4ee5\u770b\u51fa\uff0c\u5b83\u662f\u4e00\u4e2a\u961f\u5217\uff0c\u5e76\u4e14\u662f\u4e00\u4e2a\u57fa\u4e8e\u6570\u7ec4\u7684\u963b\u585e\u961f\u5217\u3002\n<\/p>\n<p>\n\tArrayBlockingQueue \u662f\u4e00\u4e2a\u6709\u754c\u961f\u5217\uff0c\u6709\u754c\u4e5f\u5c31\u610f\u5473\u7740\uff0c\u5b83\u4e0d\u80fd\u591f\u5b58\u50a8\u65e0\u9650\u591a\u6570\u91cf\u7684\u5bf9\u8c61\u3002\u6240\u4ee5\u5728\u521b\u5efa&nbsp;ArrayBlockingQueue \u65f6\uff0c\u5fc5\u987b\u8981\u7ed9\u5b83\u6307\u5b9a\u4e00\u4e2a\u961f\u5217\u7684\u5927\u5c0f\u3002\n<\/p>\n<p>\n\t<font color=\"#333333\">\u6211\u4eec\u5148\u6765\u719f\u6089\u4e00\u4e0b&nbsp;<\/font>ArrayBlockingQueue \u4e2d\u7684\u51e0\u4e2a\u91cd\u8981\u7684\u65b9\u6cd5\u3002\n<\/p>\n<ul>\n<li>\n\t\tadd(E e)\uff1a\u628a e \u52a0\u5230 BlockingQueue \u91cc\uff0c\u5373\u5982\u679c BlockingQueue \u53ef\u4ee5\u5bb9\u7eb3\uff0c\u5219\u8fd4\u56de true\uff0c\u5426\u5219\u62a5\u5f02\u5e38&nbsp;\n\t<\/li>\n<li>\n\t\toffer(E e)\uff1a\u8868\u793a\u5982\u679c\u53ef\u80fd\u7684\u8bdd\uff0c\u5c06 e \u52a0\u5230 BlockingQueue \u91cc\uff0c\u5373\u5982\u679c BlockingQueue \u53ef\u4ee5\u5bb9\u7eb3\uff0c\u5219\u8fd4\u56de true\uff0c\u5426\u5219\u8fd4\u56de false&nbsp;\n\t<\/li>\n<li>\n\t\tput(E e)\uff1a\u628a e \u52a0\u5230 BlockingQueue \u91cc\uff0c\u5982\u679c BlockQueue \u6ca1\u6709\u7a7a\u95f4\uff0c\u5219\u8c03\u7528\u6b64\u65b9\u6cd5\u7684\u7ebf\u7a0b\u88ab\u963b\u65ad\u76f4\u5230 BlockingQueue \u91cc\u9762\u6709\u7a7a\u95f4\u518d\u7ee7\u7eed\n\t<\/li>\n<li>\n\t\tpoll(time)\uff1a\u53d6\u8d70 BlockingQueue \u91cc\u6392\u5728\u9996\u4f4d\u7684\u5bf9\u8c61\uff0c\u82e5\u4e0d\u80fd\u7acb\u5373\u53d6\u51fa\uff0c\u5219\u53ef\u4ee5\u7b49 time \u53c2\u6570\u89c4\u5b9a\u7684\u65f6\u95f4,\u53d6\u4e0d\u5230\u65f6\u8fd4\u56de null&nbsp;\n\t<\/li>\n<li>\n\t\ttake()\uff1a\u53d6\u8d70 BlockingQueue \u91cc\u6392\u5728\u9996\u4f4d\u7684\u5bf9\u8c61\uff0c\u82e5 BlockingQueue \u4e3a\u7a7a\uff0c\u963b\u65ad\u8fdb\u5165\u7b49\u5f85\u72b6\u6001\u76f4\u5230 Blocking \u6709\u65b0\u7684\u5bf9\u8c61\u88ab\u52a0\u5165\u4e3a\u6b62&nbsp;\n\t<\/li>\n<li>\n\t\tremainingCapacity()\uff1a\u5269\u4f59\u53ef\u7528\u7684\u5927\u5c0f\u3002\u7b49\u4e8e\u521d\u59cb\u5bb9\u91cf\u51cf\u53bb\u5f53\u524d\u7684 size\n\t<\/li>\n<\/ul>\n<p>\n\t\u6211\u4eec\u518d\u6765\u770b\u4e00\u4e0b ArrayBlockingQueue \u4f7f\u7528\u573a\u666f\u3002\n<\/p>\n<ul>\n<li>\n\t\t\u5148\u8fdb\u5148\u51fa\u961f\u5217\uff08\u961f\u5217\u5934\u7684\u662f\u6700\u5148\u8fdb\u961f\u7684\u5143\u7d20\uff1b\u961f\u5217\u5c3e\u7684\u662f\u6700\u540e\u8fdb\u961f\u7684\u5143\u7d20\uff09\n\t<\/li>\n<li>\n\t\t\u6709\u754c\u961f\u5217\uff08\u5373\u521d\u59cb\u5316\u65f6\u6307\u5b9a\u7684\u5bb9\u91cf\uff0c\u5c31\u662f\u961f\u5217\u6700\u5927\u7684\u5bb9\u91cf\uff0c\u4e0d\u4f1a\u51fa\u73b0\u6269\u5bb9\uff0c\u5bb9\u91cf\u6ee1\uff0c\u5219\u963b\u585e\u8fdb\u961f\u64cd\u4f5c\uff1b\u5bb9\u91cf\u7a7a\uff0c\u5219\u963b\u585e\u51fa\u961f\u64cd\u4f5c\uff09\n\t<\/li>\n<li>\n\t\t\u961f\u5217\u4e0d\u652f\u6301\u7a7a\u5143\u7d20\n\t<\/li>\n<\/ul>\n<p>\n\tArrayBlockingQueue \u8fdb\u961f\u64cd\u4f5c\u91c7\u7528\u4e86\u52a0\u9501\u7684\u65b9\u5f0f\u4fdd\u8bc1\u5e76\u53d1\u5b89\u5168\u3002\u6e90\u4ee3\u7801\u91cc\u9762\u6709\u4e00\u4e2a while() \u5224\u65ad\uff1a\n<\/p>\n<pre class=\"brush:java;\">\r\npublic void put(E e) throws InterruptedException {\r\n&nbsp; &nbsp; checkNotNull(e); \/\/ \u975e\u7a7a\u5224\u65ad\r\n&nbsp; &nbsp; final ReentrantLock lock = this.lock;\r\n&nbsp; &nbsp; lock.lockInterruptibly(); \/\/ \u83b7\u53d6\u9501\r\n&nbsp; &nbsp; try {\r\n&nbsp; &nbsp; &nbsp; &nbsp; while (count == items.length) {\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/ \u4e00\u76f4\u963b\u585e\uff0c\u77e5\u9053\u961f\u5217\u975e\u6ee1\u65f6\uff0c\u88ab\u5524\u9192\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notFull.await();\r\n&nbsp; &nbsp; &nbsp; &nbsp; }\r\n&nbsp; &nbsp; &nbsp; &nbsp; enqueue(e); \/\/ \u8fdb\u961f\r\n&nbsp; &nbsp; } finally {\r\n&nbsp; &nbsp; &nbsp; &nbsp; lock.unlock();\r\n&nbsp; &nbsp; }\r\n}\r\npublic boolean offer(E e, long timeout, TimeUnit unit)\r\n&nbsp; &nbsp; throws InterruptedException {\r\n&nbsp; &nbsp; checkNotNull(e);\r\n&nbsp; &nbsp; long nanos = unit.toNanos(timeout);\r\n&nbsp; &nbsp; final ReentrantLock lock = this.lock;\r\n&nbsp; &nbsp; lock.lockInterruptibly();\r\n&nbsp; &nbsp; try {\r\n&nbsp; &nbsp; &nbsp; &nbsp; while (count == items.length) {\r\n&nbsp; &nbsp; &nbsp; &nbsp; \/\/ \u963b\u585e\uff0c\u77e5\u9053\u961f\u5217\u4e0d\u6ee1\r\n&nbsp; &nbsp; &nbsp; &nbsp; \/\/ \u6216\u8005\u8d85\u65f6\u65f6\u95f4\u5df2\u8fc7\uff0c\u8fd4\u56defalse\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (nanos &lt;= 0)\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nanos = notFull.awaitNanos(nanos);\r\n&nbsp; &nbsp; &nbsp; &nbsp; }\r\n&nbsp; &nbsp; &nbsp; &nbsp; enqueue(e);\r\n&nbsp; &nbsp; &nbsp; &nbsp; return true;\r\n&nbsp; &nbsp; } finally {\r\n&nbsp; &nbsp; &nbsp; &nbsp; lock.unlock();\r\n&nbsp; &nbsp; }\r\n}<\/pre>\n<p>\n\t\u901a\u8fc7\u6e90\u7801\u5206\u6790\uff0c\u6211\u4eec\u53ef\u4ee5\u53d1\u73b0\u4e0b\u9762\u7684\u89c4\u5f8b\uff1a\n<\/p>\n<ul>\n<li>\n\t\t\u963b\u585e\u8c03\u7528\u65b9\u5f0f put(e)\u6216 offer(e, timeout, unit)\n\t<\/li>\n<li>\n\t\t\u963b\u585e\u8c03\u7528\u65f6\uff0c\u5524\u9192\u6761\u4ef6\u4e3a\u8d85\u65f6\u6216\u8005\u961f\u5217\u975e\u6ee1\uff08\u56e0\u6b64\uff0c\u8981\u6c42\u5728\u51fa\u961f\u65f6\uff0c\u8981\u53d1\u8d77\u4e00\u4e2a\u5524\u9192\u64cd\u4f5c\uff09\n\t<\/li>\n<li>\n\t\t\u8fdb\u961f\u6210\u529f\u4e4b\u540e\uff0c\u6267\u884cnotEmpty.signal()\u5524\u8d77\u88ab\u963b\u585e\u7684\u51fa\u961f\u7ebf\u7a0b\n\t<\/li>\n<\/ul>\n<p>\n\t\u51fa\u961f\u7684\u6e90\u7801\u7c7b\u4f3c\uff0c\u6211\u5c31\u4e0d\u8d34\u4e86\u3002ArrayBlockingQueue \u961f\u5217\u6211\u4eec\u53ef\u4ee5\u5728\u521b\u5efa\u7ebf\u7a0b\u6c60\u65f6\u8fdb\u884c\u4f7f\u7528\u3002\n<\/p>\n<pre class=\"brush:java;\">\r\nnew ThreadPoolExecutor(1, 1,\r\n  0L, TimeUnit.MILLISECONDS,\r\n  new ArrayBlockingQueue&lt;Runnable&gt;(2));\r\n\r\nnew ThreadPoolExecutor(1, 1,\r\n  0L, TimeUnit.MILLISECONDS,\r\n  new LinkedBlockingQueue&lt;Runnable&gt;(2));  <\/pre>\n<p>\n\t\u4e86\u89e3\u4e86\u8fd9\u4e9b\u540e\uff0c\u518d\u6765\u770b\u770b\u6211\u4eec\u5f00\u53d1\u4eba\u5458\u7684\u4f7f\u7528\u3002\n<\/p>\n<p>\n\t\u5f53\u65f6\u7ebf\u4e0a\u7cfb\u7edf\u51fa\u6545\u969c\u540e\uff0c\u5bfc\u81f4\u6240\u6709\u7684\u8bf7\u6c42\u90fd\u5904\u7406\u4e0d\u4e86\u3002\u7ed9\u4eba\u7684\u611f\u89c9\u5c31\u662f\uff0c\u754c\u9762\u4e0a\u4e00\u76f4\u5728\u8f6c\u5708\u3002\n<\/p>\n<p>\n\t\u4e8e\u662f\u4e0d\u5f97\u4e0d dump \u7ebf\u7a0b\uff0c\u7136\u540e\u91cd\u542f\u673a\u5668\uff0c\u5148\u6062\u590d\u4f7f\u7528\u3002\u6bcf\u6b21\u4e00\u6545\u969c\uff0c\u5ba2\u670d\u7535\u8bdd\u5c31\u88ab\u6253\u7206\u4e86\uff0c\u6295\u8bc9\u7387\u75af\u5347\uff0c\u5f53\u5929\u8ba2\u5355\u5927\u5e45\u4e0b\u6ed1\u3002\u524d\u524d\u540e\u540e\u53d1\u751f\u51e0\u6b21\u6545\u969c\uff0c\u9886\u5bfc\u90fd\u6c14\u75af\u4e86\u3002\u51e0\u767e\u4e07\u5c31\u8fd9\u6837\u6ca1\u4e86\uff0c\u6240\u4ee5\u7ed9\u6211\u4eec\u7684\u538b\u529b\u975e\u5e38\u7684\u5927\u3002\n<\/p>\n<p>\n\tdump \u4e0b\u6765\u540e\uff0c\u6211\u5206\u6790\u53d1\u73b0\u7ebf\u7a0b\u90fd Block \u5728\u5199\u65e5\u5fd7\u7684\u5730\u65b9\u3002\u7136\u540e\uff0c\u6211\u524d\u524d\u540e\u540e\u6015\u67e5\uff0c\u53d1\u73b0\u4e86 block \u5728\u4e86 ArrayBlockingQueue.put \u8fd9\u4e2a\u65b9\u6cd5\u3002\u68c0\u67e5\u6e90\u7801\uff0c\u53d1\u73b0\u521b\u5efa\u4e86 ArrayBlockingQueue(250) \u4e2a\u957f\u5ea6\u7684\u961f\u5217\u3002\u5f53\u961f\u5217\u8d85\u8fc7 250 \u65f6\uff0cput \u5c31\u4e00\u5b9a\u4f1a\u88ab block \u4f4f\u3002\n<\/p>\n<p>\n\t\u4e1a\u52a1\u4ee3\u7801\u62bd\u8c61\u5982\u4e0b\uff1a\n<\/p>\n<pre class=\"brush:java;\">\r\nif (blockingQueue.remainingCapacity() &lt; 1) { \r\n    \/\/todo \r\n} \r\nblockingQueue.put(...) <\/pre>\n<p>\n\t\u8fd9\u91cc\u4e24\u4e2a\u60b2\u50ac\u7684\u95ee\u9898\uff0c\u4e00\u662f\u8fd9\u4e2a if \u5224\u65ad\u5b8c\u540e\uff0c\u8fd8\u662f\u4f1a\u8fdb\u884c put \u64cd\u4f5c\uff0c\u5e94\u8be5\u662f else \u4e2d\u8fdb\u884c put \u64cd\u4f5c\uff1b\u4e8c\u662f\u6ee1\u4e86\u4e4b\u540e\uff0c\u8fd8\u5728 todo\uff0c\u505a\u5176\u4ed6\u4e8b\u60c5\u3002\n<\/p>\n<p>\n\t\u5176\u5b9e\u6211\u4eec\u8fd9\u91cc\u53ef\u4ee5\u5b8c\u5168\u6ca1\u5fc5\u8981\u8fdb\u884c if (blockingQueue.remainingCapacity() &lt; 1) \u5224\u65ad\uff0c\u4f7f\u7528 blockingQueue.offer \u4e0d\u5c31\u5b8c\u4e8b\u4e86\u561b\u3002\u5982\u679c BlockingQueue \u53ef\u4ee5\u5bb9\u7eb3\uff0c\u5219\u8fd4\u56de true\uff0c\u5426\u5219\u8fd4\u56de false\u3002\n<\/p>\n<p>\n\t\u6240\u4ee5\u8bf4\uff0c\u9664\u4e86\u6280\u672f\u672c\u8eab\u5916\uff0c\u4ee3\u7801\u7684\u7ec6\u8282\u529f\u529b\u662f\u975e\u5e38\u975e\u5e38\u91cd\u8981\u7684\u3002\n<\/p>\n<p>\n\t\u5b66\u4e60\u5e76\u4e0d\u662f\u4e3a\u4e86\u89e3\u51b3 bug\uff0c\u800c\u662f\u9884\u9632 bug \u4ea7\u751f\uff01<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=3686\">\u4e00\u4e2a ArrayBlockingQueue \u4e0d\u5f53\u4f7f\u7528\uff0c\u5bfc\u81f4\u516c\u53f8\u635f\u5931\u51e0\u767e\u4e07\uff01<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u6211\u4eec\u4e3a\u4ec0\u4e48\u8981\u62db\u9ad8\u7ea7\u7a0b\u5e8f\u5458\u5462\uff1f\u56e0\u4e3a\u9ad8\u7ea7\u7a0b\u5e8f\u5458\u5199\u7684 bug \u53ef\u80fd\u66f4\u5c11\uff0c\u5728\u8c03\u7528 api \u7684\u65f6\u5019\uff0c\u72af\u9519\u7684\u6982\u7387\u66f4\u5c0f\u3002\u4f46\u662f [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1758,144,143,145,140],"class_list":["post-3686","post","type-post","status-publish","format-standard","hentry","category-java","tag-abstractqueuedsynchronizer","tag-arrayblockingqueue","tag-blockingqueue","tag-linkedblockingqueue","tag-queue"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3686"}],"version-history":[{"count":2,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3686\/revisions"}],"predecessor-version":[{"id":3688,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3686\/revisions\/3688"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}