{"id":213319,"date":"2014-02-20T18:11:03","date_gmt":"2014-02-20T14:11:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=213319"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=213319","title":{"rendered":"<span class=\"post_title\">\u041f\u0443\u0442\u0435\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043f\u043e \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u043a\u043b\u0430\u0441\u0441\u0430 java.util.concurrent.CompletableFuture<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041a\u043b\u0430\u0441\u0441 CompletableFuture \u2014 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443 \u044d\u0442\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. <\/p>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c\u0441\u044f. \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u0432 \u043d\u0438\u0445 \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u043b\u044f \u0440\u0430\u0437\u043c\u0438\u043d\u043a\u0438 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 java.util.Function, \u043a\u043e\u0442\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u0442\u0438\u043f\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445. <\/p>\n<pre><code class=\"java\">\/\/ \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 BiFunction&lt;T, U,R&gt; {   R apply(T t, U u); } \/\/ \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 BiConsumer&lt;T,U&gt;  {   void  accept(T t, U u) } \/\/ \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 Function&lt;T, R&gt; {   R apply(T t); } \/\/ \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 Consumer&lt;T&gt; {   void accept(T t); } \/\/ \u0411\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 Supplier&lt;T&gt; {   T get(); } <\/code><\/pre>\n<p>  \u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u0430\u0440\u044b\u0439 \u0434\u043e\u0431\u0440\u044b\u0439 Runnable:  <\/p>\n<pre><code class=\"java\">\/\/ \u0411\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 Runnable {   void run(); } <\/code><\/pre>\n<p>  \u042d\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u0442\u043e \u0435\u0441\u0442\u044c, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u044b \u043a\u0430\u043a \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0442\u0430\u043a \u0438 \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u043b\u0438 \u043b\u044f\u043c\u0431\u0434\u0430-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>  \u041a\u0430\u043a \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043b\u0430\u0441\u0441 <code>CompletableFuture<\/code> \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0430 \u0441\u0443\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u2014 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 (\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435) \u0438 \u043e\u043f\u043e\u0441\u0440\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0435 (\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435). \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f (<code>java.util.concurrent.Future<\/code>, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d java 5), \u043d\u043e \u0432 \u0446\u0435\u043b\u044f\u0445 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435. \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0443\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c, \u044f \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0443 \u0441\u0442\u0430\u0440\u0430\u0442\u044c\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044f\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u043c\u0435\u0442\u043e\u0434\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438.<\/p>\n<p>  \u0414\u043b\u044f \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u201c\u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 CompletableFuture\u201d \u0431\u0443\u0434\u0435\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u201c\u0444\u044c\u044e\u0447\u0435\u0440\u0441\u201d. \u00ab\u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u00bb \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0444\u044c\u044e\u0447\u0435\u0440\u0441, \u043a \u043a\u043e\u0442\u043e\u0440\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u0441\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043c\u0435\u0442\u043e\u0434.<\/p>\n<h4>1. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438<\/h4>\n<p>  \u0411\u0430\u0437\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0434\u0432\u0430 \u2014 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"java\">boolean complete(T value) boolean completeExceptionally(Throwable ex) <\/code><\/pre>\n<p>\u0441 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0439 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u043e\u0439.<\/p>\n<p>  \u041f\u0440\u043e\u0447\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b: <\/p>\n<pre><code class=\"java\">boolean cancel(boolean mayInterruptIfRunning) <\/code><\/pre>\n<p>\u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u0435\u043d <code>completeExceptionally(new CancellationException)<\/code>. \u0412\u0432\u0435\u0434\u0435\u043d \u0434\u043b\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441 java.util.concurrent.Future.<\/p>\n<pre><code class=\"java\">static &lt;U&gt; CompletableFuture&lt;U&gt; completedFuture(U value) <\/code><\/pre>\n<p>\u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u0435\u043d <code>CompletableFuture res=new CompletableFuture(); res.complete(value)<\/code>.<\/p>\n<pre><code class=\"java\">void obtrudeValue(T value) void obtrudeException(Throwable ex) <\/code><\/pre>\n<p>\u041d\u0430\u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0445\u0440\u0430\u043d\u044f\u0449\u0435\u0435\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412\u0435\u0440\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0432 \u043d\u043e\u0433\u0443.<\/p>\n<h4>2. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f<\/h4>\n<p>  <\/p>\n<pre><code class=\"java\">boolean isDone() <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0431\u044b\u043b \u043b\u0438 \u0443\u0436\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u044c\u044e\u0447\u0435\u0440\u0441.<\/p>\n<pre><code class=\"java\">T get() <\/code><\/pre>\n<p>\u0416\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043d, \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u0431\u044b\u043b\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0431\u0440\u043e\u0441\u0430\u0435\u0442 ExecutionException.<\/p>\n<p>  \u041f\u0440\u043e\u0447\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b:<\/p>\n<pre><code class=\"java\">boolean isCancelled() <\/code><\/pre>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0431\u044b\u043b\u043e \u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 cancel().<\/p>\n<pre><code class=\"java\">T join() <\/code><\/pre>\n<p>\u0422\u043e \u0436\u0435, \u0447\u0442\u043e get(), \u043d\u043e \u0431\u0440\u043e\u0441\u0430\u0435\u0442 CompletionException.<\/p>\n<pre><code class=\"java\">T get(long timeout, TimeUnit unit) <\/code><\/pre>\n<p><code>get()<\/code> \u0441 \u0442\u0430\u0439\u043c-\u0430\u0443\u0442\u043e\u043c.<\/p>\n<pre><code class=\"java\">T getNow(T valueIfAbsent) <\/code><\/pre>\n<p>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u0415\u0441\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043d, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>valueIfAbsent<\/code>.<\/p>\n<pre><code class=\"java\">int getNumberOfDependents() <\/code><\/pre>\n<p>\u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0434\u0440\u0443\u0433\u0438\u0445 CompletableFuture, \u0436\u0434\u0443\u0449\u0438\u0445 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e.<\/p>\n<h4>3. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043e\u043f\u043e\u0441\u0440\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438<\/h4>\n<p>  <\/p>\n<pre><code class=\"java\">static &lt;U&gt; CompletableFuture&lt;U&gt; supplyAsync(Supplier&lt;U&gt; supplier) <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 supplier, \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0444\u044c\u044e\u0447\u0435\u0440\u0441. \u0417\u0430\u043f\u0443\u0441\u043a \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c \u043f\u0443\u043b\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432.<\/p>\n<pre><code class=\"java\">static &lt;U&gt; CompletableFuture&lt;U&gt; supplyAsync(Supplier&lt;U&gt; supplier, Executor executor) <\/code><\/pre>\n<p>\u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u0430 \u043f\u0443\u043b\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c executor.<\/p>\n<pre><code class=\"java\">static CompletableFuture&lt;Void&gt; runAsync(Runnable runnable) static CompletableFuture&lt;Void&gt; runAsync(Runnable runnable, Executor executor) <\/code><\/pre>\n<p>\u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 <code>supplyAsync<\/code>, \u043d\u043e \u0430\u043a\u0446\u0438\u044f \u0442\u0438\u043f\u0430 <code>Runnable<\/code> \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0442\u0438\u043f\u0430 <code>Void<\/code>.<\/p>\n<h4>4. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043e\u043f\u043e\u0441\u0440\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u041f\u0440\u0435\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (\u0440\u0435\u0430\u043a\u0446\u0438\u044e) \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043f\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u044d\u0442\u043e\u0433\u043e (\u0438\/\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e) \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430. \u0421\u0430\u043c\u044b\u0439 \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u0439 \u0441\u0443\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u041a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u043e \u0434\u0432\u0443\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c:<\/p>\n<p>  \u0430) \u0441\u043f\u043e\u0441\u043e\u0431 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0440\u0435\u0430\u043a\u0446\u0438\u0438 \u043d\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435: \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u043a\u0430\u043a \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430, \u0438\u043b\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u043a\u0430\u043a \u0437\u0430\u0434\u0430\u0447\u0443 \u043d\u0430 \u043f\u0443\u043b\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u044b \u0441 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u043c Async (\u0432 \u0434\u0432\u0443\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u0445 \u2014 \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u0430 \u043e\u0431\u0449\u0435\u043c \u043f\u043e\u0442\u043e\u043a\u0435 <code>ForkJoinPool.commonPool()<\/code>, \u043b\u0438\u0431\u043e \u043d\u0430 \u043f\u043e\u0442\u043e\u043a\u0435, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c). \u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<p>  \u0431) \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0434\u0430\u043d\u043d\u044b\u043c \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u043c \u0438 \u0440\u0435\u0430\u043a\u0446\u0438\u0435\u0439 \u043d\u0430 \u0435\u0433\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435: \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f, \u0442\u0438\u043f\u0430 \u201cany\u201c \u0438 \u0442\u0438\u043f\u0430 \u201dall\u201d.<\/p>\n<p>   \u2014 \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c: \u043e\u0434\u0438\u043d \u0444\u044c\u044e\u0447\u0435\u0440\u0441 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0434\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0440\u0435\u0430\u043a\u0446\u0438\u044e<\/p>\n<p>   \u2014 \u0441\u043f\u043e\u0441\u043e\u0431 \u201cany\u201d \u2014 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0434\u0432\u0430 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430; \u043f\u0435\u0440\u0432\u044b\u0439 (\u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438) \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u0432, \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043a\u0446\u0438\u044e; \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f<\/p>\n<p>   \u2014 \u0441\u043f\u043e\u0441\u043e\u0431 \u201call\u201d \u2014 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0434\u0432\u0430 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430; \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u0441\u0435\u0445 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u0432 \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043a\u0446\u0438\u044e.<\/p>\n<h5>4.1 \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0440\u0435\u0430\u043a\u0446\u0438\u044e \u043f\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430 (\u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c)<\/h5>\n<p>  \u042d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u043c\u0435\u044e\u0442 \u0438\u043c\u0435\u043d\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 then, \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u2014 \u0440\u0435\u0430\u043a\u0446\u0438\u044e, \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043d\u043e\u0432\u044b\u0439 \u0444\u044c\u044e\u0447\u0435\u0440\u0441 \u0442\u0438\u043f\u0430 <code>CompletableFuture <\/code>\u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043a\u0446\u0438\u0438. \u0420\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0442\u0438\u043f\u0443 \u0440\u0435\u0430\u043a\u0446\u0438\u0438.<\/p>\n<pre><code class=\"java\">&lt;U&gt; CompletableFuture&lt;U&gt; thenApply(Function&lt;? super T,? extends U&gt; fn) <\/code><\/pre>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0435\u0430\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0444\u044c\u044e\u0447\u0435\u0440\u0441.<\/p>\n<pre><code class=\"java\">CompletableFuture&lt;Void&gt; thenAccept(Consumer&lt;? super T&gt; block) <\/code><\/pre>\n<p>\u0420\u0435\u0430\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430, \u043d\u043e \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0447\u0442\u043e <br \/>  \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430 \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <code>Void<\/code>.<\/p>\n<pre><code class=\"java\">CompletableFuture&lt;Void&gt; thenRun(Runnable action) <\/code><\/pre>\n<p>\u0420\u0435\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438 \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041f\u0443\u0441\u0442\u044c compute1..compute4 \u2014 \u044d\u0442\u043e \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u044b. \u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0442 \u0448\u0430\u0433\u0430 \u043a \u0448\u0430\u0433\u0443 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"java\">supplyAsync(compute1)   .thenApply(compute2)   .thenApply(compute3)   .thenAccept(compute4); <\/code><\/pre>\n<p>  \u0447\u0442\u043e \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u0432\u044b\u0437\u043e\u0432\u0443  <\/p>\n<pre><code class=\"java\">compute4(compute3(compute2(compute1()))); <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"java\">&lt;U&gt; CompletableFuture&lt;U&gt; thenCompose(Function&lt;? super T, CompletableFuture&lt;U&gt;&gt; fn) <\/code><\/pre>\n<p>\u0422\u043e \u0436\u0435, \u0447\u0442\u043e <code>thenApply<\/code>, \u043d\u043e \u0440\u0435\u0430\u043a\u0446\u0438\u044f \u0441\u0430\u043c\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0444\u044c\u044e\u0447\u0435\u0440\u0441 \u0432\u043c\u0435\u0441\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043a\u0446\u0438\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0438.<\/p>\n<h5>4.2 \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0440\u0435\u0430\u043a\u0446\u0438\u044e \u043f\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u0437 \u043c\u043d\u043e\u0433\u0438\u0445 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u0432<\/h5>\n<p>  <\/p>\n<pre><code class=\"java\">static CompletableFuture&lt;Object&gt; anyOf(CompletableFuture&lt;?&gt;... cfs) <\/code><\/pre>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0444\u044c\u044e\u0447\u0435\u0440\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u0432, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>cfs<\/code>. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430.<\/p>\n<h5>4.3 \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0440\u0435\u0430\u043a\u0446\u0438\u044e \u043f\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u0432<\/h5>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434:<\/p>\n<pre><code class=\"java\">&lt;U&gt; CompletableFuture&lt;U&gt; applyToEither(CompletableFuture&lt;? extends T&gt; other, Function&lt;? super T,U&gt; fn) <\/code><\/pre>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0444\u044c\u044e\u0447\u0435\u0440\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u044c\u044e\u0447\u0435\u0440\u0441 \u043b\u0438\u0431\u043e \u0444\u044c\u044e\u0447\u0435\u0440\u0441, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>other<\/code>. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430.<\/p>\n<p>  \u041c\u0435\u0442\u043e\u0434 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u0435\u043d \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044e:  <\/p>\n<pre><code class=\"java\">CompletableFuture.anyOf(this, other).thenApply(fn); <\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0442\u0438\u043f\u043e\u043c \u0440\u0435\u0430\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"java\">CompletableFuture&lt;Void&gt; acceptEither(CompletableFuture&lt;? extends T&gt; other, Consumer&lt;? super T&gt; block) CompletableFuture&lt;Void&gt; runAfterEither(CompletableFuture&lt;?&gt; other, Runnable action) <\/code><\/pre>\n<p>  \u041d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0437\u0430\u0447\u0435\u043c \u0431\u044b\u043b\u043e \u0434\u0435\u043b\u0430\u0442\u044c 3 \u043c\u0435\u0442\u043e\u0434\u0430 *Either (9 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c *Async \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432), \u043a\u043e\u0433\u0434\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0434\u043d\u043e\u0433\u043e:  <\/p>\n<pre><code class=\"java\">&lt;T&gt; CompletableFuture&lt;T&gt; either(CompletableFuture&lt;? extends T&gt; other) {   return CompletableFuture.anyOf(this, other); }<\/code><\/pre>\n<p>  \u0442\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u043a\u0430\u043a:<\/p>\n<pre><code class=\"java\">f1.applyToEither(other, fn) == f1.either(other).thenApply(fn); f1.applyToEitherAsync(other, fn) == f1.either(other).thenApplyAsync(fn); f1.applyToEitherAsync(other, fn, executor) == f1.either(other).thenApplyAsync(fn, executor); f1.acceptEither(other, block) == f1.either(other).thenAccept(other); f1.runAfterEither(other, action) == f1.either(other).thenRun(action); <\/code><\/pre>\n<p>  \u0438 \u0442.\u043f. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u0435\u0442\u043e\u0434 either \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f\u0445.<\/p>\n<h5>4.4 \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0440\u0435\u0430\u043a\u0446\u0438\u044e \u043f\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0434\u0432\u0443\u0445 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u0432<\/h5>\n<p>  <\/p>\n<pre><code class=\"java\">&lt;U,V&gt; CompletableFuture&lt;V&gt;     thenCombine(CompletionStage&lt;? extends U&gt; other, BiFunction&lt;? super T,? super U,? extends V&gt; fn) <\/code><\/pre>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434. \u0418\u043c\u0435\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0434\u0432\u0430 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043a\u0446\u0438\u044e, \u044f\u0432\u043b\u044f\u044e\u0449\u0435\u0439\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u043e\u0442 \u0434\u0432\u0443\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<p>  \u041f\u0440\u043e\u0447\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u0438\u043f\u043e\u043c \u0440\u0435\u0430\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"java\">&lt;U&gt; CompletableFuture&lt;Void&gt; thenAcceptBoth(CompletableFuture&lt;? extends U&gt; other, BiConsumer&lt;? super T,? super U&gt; block) <\/code><\/pre>\n<p>\u0440\u0435\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<pre><code class=\"java\">CompletableFuture&lt;Void&gt; runAfterBoth(CompletableFuture&lt;?&gt; other, Runnable action) <\/code><\/pre>\n<p>\u0440\u0435\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<h5>4.5 \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0440\u0435\u0430\u043a\u0446\u0438\u044e \u043f\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u043c\u043d\u043e\u0433\u0438\u0445 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u0432<\/h5>\n<p>  <\/p>\n<pre><code class=\"java\">static CompletableFuture&lt;Void&gt; allOf(CompletableFuture&lt;?&gt;... cfs) <\/code><\/pre>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 CompletableFuture, \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0435\u0435\u0441\u044f \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e \u0432\u0441\u0435\u0445 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u0432 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u2014 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0444\u044c\u044e\u0447\u0435\u0440\u0441 \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432\u043e \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430\u0445-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445, \u0442\u0430\u043a \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b, \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c.<\/p>\n<h5>4.6. \u041f\u0435\u0440\u0435\u0445\u0432\u0430\u0442 \u043e\u0448\u0438\u0431\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/h5>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u044d\u0442\u0430\u043f\u0435 \u0444\u044c\u044e\u0447\u0435\u0440\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u0441\u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0443 \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.<\/p>\n<pre><code class=\"java\">CompletableFuture&lt;T&gt; exceptionally(Function&lt;Throwable,? extends T&gt; fn) <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u044c\u044e\u0447\u0435\u0440\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0444\u044c\u044e\u0447\u0435\u0440\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c, \u0432\u044b\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <code>fn<\/code>. \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u044c\u044e\u0447\u0435\u0440\u0441 \u0437\u0430\u0432\u0430\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0444\u044c\u044e\u0447\u0435\u0440\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0441 \u0442\u0435\u043c \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c.<\/p>\n<pre><code class=\"java\">&lt;U&gt; CompletableFuture&lt;U&gt; handle(BiFunction&lt;? super T,Throwable,? extends U&gt; fn) <\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u0440\u0435\u0430\u043a\u0446\u0438\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u0437\u0430\u0432\u0430\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u044c\u044e\u0447\u0435\u0440\u0441 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e. \u0415\u0441\u043b\u0438 \u0444\u044c\u044e\u0447\u0435\u0440\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c <code>r<\/code>, \u0442\u043e \u0432 \u0440\u0435\u0430\u043a\u0446\u0438\u044e \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<code> (r, null)<\/code>, \u0435\u0441\u043b\u0438 \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e \u0441 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c ex, \u0442\u043e \u0432 \u0440\u0435\u0430\u043a\u0446\u0438\u044e \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<code> (null, ex)<\/code>. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0435\u0430\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043d\u0435\u0436\u0435\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u0437\u044f\u0442 \u0438\u0437 <a href=\"http:\/\/nurkiewicz.blogspot.ru\/2013\/05\/java-8-definitive-guide-to.html\">http:\/\/nurkiewicz.blogspot.ru\/2013\/05\/java-8-definitive-guide-to.html<\/a>:<\/p>\n<pre><code class=\"java\">CompletableFuture&lt;Integer&gt; safe = future.handle((r, ex) -&gt; {     if (r != null) {             return Integer.parseInt(r);     } else {             log.warn(&quot;Problem&quot;, ex);             return -1;     } }); <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c <code>future <\/code>\u0432\u044b\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u0438\u043f\u0430 <code>String <\/code>\u043b\u0438\u0431\u043e \u043e\u0448\u0438\u0431\u043a\u0443, \u0440\u0435\u0430\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u044b\u0434\u0430\u0435\u0442 -1. \u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435-\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430\u0434\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0441 <code>if (ex!=null)<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a<code>r==null<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u0438 \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e\u043c, \u0442\u0430\u043a \u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438, \u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043b\u0443\u0447\u0430\u0439 <code>r==null<\/code> \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441, \u043f\u0440\u043e\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u0432\u0438\u0434\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0440\u0435\u0448\u0438\u0442\u044c \u0442\u0435 \u0438\u043b\u0438 \u0438\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435.      \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/213319\/\"> http:\/\/habrahabr.ru\/post\/213319\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041a\u043b\u0430\u0441\u0441 CompletableFuture \u2014 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443 \u044d\u0442\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. <\/p>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c\u0441\u044f. \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u0432 \u043d\u0438\u0445 \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-213319","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/213319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=213319"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/213319\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=213319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=213319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=213319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}