-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add abilty to yield in Ivarators, AndIterator, OrIterator and return …
…metrics before yield
- Loading branch information
Showing
44 changed files
with
2,533 additions
and
745 deletions.
There are no files selected for viewing
442 changes: 236 additions & 206 deletions
442
...ery-core/src/main/java/datawave/core/iterators/DatawaveFieldIndexCachingIteratorJexl.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
warehouse/query-core/src/main/java/datawave/core/iterators/IvaratorFuture.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package datawave.core.iterators; | ||
|
||
import java.util.concurrent.ExecutionException; | ||
import java.util.concurrent.Future; | ||
import java.util.concurrent.TimeUnit; | ||
import java.util.concurrent.TimeoutException; | ||
|
||
public class IvaratorFuture implements Future { | ||
|
||
private Future future; | ||
private IvaratorRunnable ivaratorRunnable; | ||
|
||
public IvaratorFuture(Future future, IvaratorRunnable ivaratorRunnable) { | ||
this.future = future; | ||
this.ivaratorRunnable = ivaratorRunnable; | ||
} | ||
|
||
@Override | ||
public boolean cancel(boolean mayInterruptIfRunning) { | ||
return this.future.cancel(mayInterruptIfRunning); | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return this.future.isCancelled(); | ||
} | ||
|
||
@Override | ||
public boolean isDone() { | ||
return this.future.isDone(); | ||
} | ||
|
||
@Override | ||
public Object get() throws InterruptedException, ExecutionException { | ||
return this.future.get(); | ||
} | ||
|
||
@Override | ||
public Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { | ||
return this.future.get(timeout, unit); | ||
} | ||
|
||
public DatawaveFieldIndexCachingIteratorJexl getIvarator() { | ||
return ivaratorRunnable.getIvarator(); | ||
} | ||
|
||
public IvaratorRunnable getIvaratorRunnable() { | ||
return ivaratorRunnable; | ||
} | ||
} |
Oops, something went wrong.