public abstract class AbstractMigrator extends Object implements Migrator
| Modifier and Type | Field and Description |
|---|---|
static int |
BATCH_SIZE |
| Constructor and Description |
|---|
AbstractMigrator() |
| Modifier and Type | Method and Description |
|---|---|
AbstractMigrator |
registerMacro(Macro macro)
Register a macro to use in templating
|
protected <T> java.util.stream.Stream<T> |
stream(Iterator<T> iterator)
Partition a stream into a stream of collections, each with batchSize elements.
|
protected Optional<InsertQuery> |
template(String template,
Map<String,Object> data) |
protected boolean |
validValue(Object value)
Test if an object is a valid Grakn value
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosepublic static final int BATCH_SIZE
public AbstractMigrator registerMacro(Macro macro)
protected Optional<InsertQuery> template(String template, Map<String,Object> data)
template - a string representing a templated graql querydata - data used in the templateprotected <T> java.util.stream.Stream<T> stream(Iterator<T> iterator)
T - Type of values of iteratoriterator - Iterator to partitionprotected boolean validValue(Object value)
value - object to checkCopyright © 2016 Grakn Labs Ltd. All rights reserved.