| Constructor and Description |
|---|
LoaderImpl(String keyspace) |
| 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()
Method that logs the current state of loading tasks
|
void |
sendQueriesToLoader(Collection<InsertQuery> batch)
Method to load data into the graph.
|
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.
|
public LoaderImpl(String keyspace)
public int getBatchSize()
getBatchSize in interface Loaderpublic Loader setBatchSize(int size)
setBatchSize in interface Loadersize - number of vars in each transactionpublic Loader setQueueSize(int size)
setQueueSize in interface Loadersize - the size of the queuepublic void flush()
public void add(InsertQuery query)
public void sendQueriesToLoader(Collection<InsertQuery> batch)
public void waitToFinish()
waitToFinish in interface Loaderpublic void waitToFinish(int timeout)
waitToFinish in interface Loadertimeout - amount of time (in ms) to wait.public void printLoaderState()
printLoaderState in interface LoaderCopyright © 2016 Grakn Labs Ltd. All rights reserved.