public interface Loader
| Modifier and Type | Method and Description |
|---|---|
void |
add(InsertQuery query)
Add an insert query to the queue
|
void |
flush()
Load any remaining batches in the queue.
|
int |
getBatchSize() |
void |
printLoaderState()
Print the number of jobs that have completed
|
Loader |
setBatchSize(int size)
Set the size of the each transaction in terms of number of vars.
|
Loader |
setQueueSize(int size)
Set the size of the queue- this is equivalent to the size of the semaphore.
|
void |
waitToFinish()
Wait for all tasks to finish for one minute.
|
void |
waitToFinish(int timeout)
Wait for all tasks to finish.
|
void flush()
int getBatchSize()
void add(InsertQuery query)
query - insert query to be executedLoader setBatchSize(int size)
size - number of vars in each transactionLoader setQueueSize(int size)
size - the size of the queuevoid waitToFinish()
void waitToFinish(int timeout)
timeout - amount of time (in ms) to wait.void printLoaderState()
Copyright © 2016 Grakn Labs Ltd. All rights reserved.