this.lastEntityType = new AtomicReference<EntityType>();
int queueSize = Integer.valueOf(params.getProperty(Parameters.CONFIG_QUEUE_SIZE));
this.taskQueue = new ArrayBlockingQueue<Entity>(queueSize);
int poolSize = Integer.valueOf(params.getProperty(Parameters.CONFIG_WORKER_POOL_SIZE));
this.workers = new ArrayList<Worker>(poolSize);
EntityBufferFactory factory = new EntityBufferFactory(entityDao, params);
for (int i = 0; i < poolSize; i++) {
String name = "Worker #" + i;
Worker worker = new Worker(name, taskQueue, factory);
workers.add(worker);
worker.start();