Search in sources :

Example 1 with LocalPoolCreateJob

use of org.opendaylight.genius.idmanager.jobs.LocalPoolCreateJob in project genius by opendaylight.

the class IdManager method createLocalPool.

private IdLocalPool createLocalPool(WriteTransaction tx, String localPoolName, IdPool idPool) throws OperationFailedException, IdManagerException {
    localPoolName = localPoolName.intern();
    IdLocalPool idLocalPool = new IdLocalPool(idUtils, localPoolName);
    allocateIdBlockFromParentPool(idLocalPool, idPool, tx);
    String parentPool = idPool.getPoolName();
    localPool.put(parentPool, idLocalPool);
    LocalPoolCreateJob job = new LocalPoolCreateJob(idLocalPool, txRunner, idPool.getPoolName(), idPool.getBlockSize(), idUtils);
    jobCoordinator.enqueueJob(localPoolName, job, IdUtils.RETRY_COUNT);
    return idLocalPool;
}
Also used : LocalPoolCreateJob(org.opendaylight.genius.idmanager.jobs.LocalPoolCreateJob)

Aggregations

LocalPoolCreateJob (org.opendaylight.genius.idmanager.jobs.LocalPoolCreateJob)1