public void setPool(final ExternalExecutorService executorService) {
// any monitor/lock could be used... using onHold so that it is obvious
synchronized ( onHold ) {
this.executorService.set( executorService );
while( this.executorService.get() != null && ! queue.isEmpty() ) {
PartitionTask task = queue.poll();
this.executorService.get().execute( task );
}
}
}