/**
  *
  *
  * @return Persister
  */
 public function build()
 {
     if (is_null($this->cacheClient)) {
         $cacheStorage = new \perf\Caching\VolatileStorage();
         $this->cacheClient = new \perf\Caching\CacheClient($cacheStorage);
     }
     $entityMetadataPool = new EntityMetadataPool();
     $entityMetadataPool->setCacheClient($this->cacheClient);
     $operatorFactory = new \perf\Persistence\Operation\OperatorFactory();
     $operatorFactory->setEntityMetadataPool($entityMetadataPool);
     $operatorFactory->setConnectionPool($this->connectionPool);
     $persister = new Persister();
     $persister->setOperatorFactory($operatorFactory);
     return $persister;
 }
 /**
  *
  *
  * @param string $entityClass
  * @return EntityMetadata
  * @throws \DomainException
  */
 protected function getEntityClassMetadata($entityClass)
 {
     return $this->entityMetadataPool->fetch($entityClass);
 }