@@ -38,7 +38,7 @@ public final class ExecutionResult {
3838 /** Whether the result represents a non result rather than a {@code null} result */
3939 private final boolean nonResult ;
4040 /** The amount of time to wait prior to the next execution, according to the policy */
41- private final long waitNanos ;
41+ private final long delayNanos ;
4242 /** Whether a policy has completed handling of the execution */
4343 private final boolean complete ;
4444 /** Whether a policy determined the execution to be a success */
@@ -54,12 +54,12 @@ public ExecutionResult(Object result, Throwable failure) {
5454 this (result , failure , false , 0 , true , failure == null , failure == null );
5555 }
5656
57- private ExecutionResult (Object result , Throwable failure , boolean nonResult , long waitNanos , boolean complete ,
57+ private ExecutionResult (Object result , Throwable failure , boolean nonResult , long delayNanos , boolean complete ,
5858 boolean success , Boolean successAll ) {
5959 this .nonResult = nonResult ;
6060 this .result = result ;
6161 this .failure = failure ;
62- this .waitNanos = waitNanos ;
62+ this .delayNanos = delayNanos ;
6363 this .complete = complete ;
6464 this .success = success ;
6565 this .successAll = successAll ;
@@ -84,8 +84,8 @@ public Throwable getFailure() {
8484 return failure ;
8585 }
8686
87- public long getWaitNanos () {
88- return waitNanos ;
87+ public long getDelay () {
88+ return delayNanos ;
8989 }
9090
9191 public boolean isComplete () {
@@ -107,7 +107,7 @@ public boolean isSuccess() {
107107 ExecutionResult withNonResult () {
108108 return success && this .result == null && nonResult ?
109109 this :
110- new ExecutionResult (null , null , true , waitNanos , true , true , successAll );
110+ new ExecutionResult (null , null , true , delayNanos , true , true , successAll );
111111 }
112112
113113 /**
@@ -119,7 +119,7 @@ public ExecutionResult withResult(Object result) {
119119 boolean unchangedNotNull = this .result != null && this .result .equals (result );
120120 return success && (unchangedNull || unchangedNotNull ) ?
121121 this :
122- new ExecutionResult (result , null , nonResult , waitNanos , true , true , successAll );
122+ new ExecutionResult (result , null , nonResult , delayNanos , true , true , successAll );
123123 }
124124
125125 /**
@@ -128,14 +128,14 @@ public ExecutionResult withResult(Object result) {
128128 ExecutionResult withNotComplete () {
129129 return !this .complete ?
130130 this :
131- new ExecutionResult (result , failure , nonResult , waitNanos , false , success , successAll );
131+ new ExecutionResult (result , failure , nonResult , delayNanos , false , success , successAll );
132132 }
133133
134134 /**
135135 * Returns a copy of the ExecutionResult with success value of {code false}.
136136 */
137137 ExecutionResult withFailure () {
138- return !this .success ? this : new ExecutionResult (result , failure , nonResult , waitNanos , complete , false , false );
138+ return !this .success ? this : new ExecutionResult (result , failure , nonResult , delayNanos , complete , false , false );
139139 }
140140
141141 /**
@@ -144,25 +144,25 @@ ExecutionResult withFailure() {
144144 ExecutionResult withSuccess () {
145145 return this .complete && this .success ?
146146 this :
147- new ExecutionResult (result , failure , nonResult , waitNanos , true , true , successAll );
147+ new ExecutionResult (result , failure , nonResult , delayNanos , true , true , successAll );
148148 }
149149
150150 /**
151- * Returns a copy of the ExecutionResult with the {@code waitNanos } value.
151+ * Returns a copy of the ExecutionResult with the {@code delayNanos } value.
152152 */
153- public ExecutionResult withWaitNanos (long waitNanos ) {
154- return this .waitNanos == waitNanos ?
153+ public ExecutionResult withDelay (long delayNanos ) {
154+ return this .delayNanos == delayNanos ?
155155 this :
156- new ExecutionResult (result , failure , nonResult , waitNanos , complete , success , successAll );
156+ new ExecutionResult (result , failure , nonResult , delayNanos , complete , success , successAll );
157157 }
158158
159159 /**
160- * Returns a copy of the ExecutionResult with the {@code waitNanos }, {@code complete} and {@code success} values.
160+ * Returns a copy of the ExecutionResult with the {@code delayNanos }, {@code complete} and {@code success} values.
161161 */
162- public ExecutionResult with (long waitNanos , boolean complete , boolean success ) {
163- return this .waitNanos == waitNanos && this .complete == complete && this .success == success ?
162+ public ExecutionResult with (long delayNanos , boolean complete , boolean success ) {
163+ return this .delayNanos == delayNanos && this .complete == complete && this .success == success ?
164164 this :
165- new ExecutionResult (result , failure , nonResult , waitNanos , complete , success ,
165+ new ExecutionResult (result , failure , nonResult , delayNanos , complete , success ,
166166 successAll == null ? success : success && successAll );
167167 }
168168
@@ -172,7 +172,7 @@ boolean getSuccessAll() {
172172
173173 @ Override
174174 public String toString () {
175- return "[" + "result=" + result + ", failure=" + failure + ", nonResult=" + nonResult + ", waitNanos =" + waitNanos
175+ return "[" + "result=" + result + ", failure=" + failure + ", nonResult=" + nonResult + ", delayNanos =" + delayNanos
176176 + ", complete=" + complete + ", success=" + success + ", successAll=" + successAll + ']' ;
177177 }
178178
0 commit comments