Class IdManager
- java.lang.Object
-
- org.opendaylight.genius.idmanager.IdManager
-
- All Implemented Interfaces:
IdManagerMonitor
,IdManagerService
,org.opendaylight.yangtools.yang.binding.RpcService
@Singleton public class IdManager extends java.lang.Object implements IdManagerService, IdManagerMonitor
-
-
Constructor Summary
Constructors Constructor Description IdManager(org.opendaylight.controller.md.sal.binding.api.DataBroker db, LockManagerService lockManager, IdUtils idUtils, org.opendaylight.daexim.DataImportBootReady dataImportBootReady, org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<AllocateIdOutput>>
allocateId(AllocateIdInput input)
com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<AllocateIdRangeOutput>>
allocateIdRange(AllocateIdRangeInput input)
void
close()
com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<CreateIdPoolOutput>>
createIdPool(CreateIdPoolInput input)
com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<DeleteIdPoolOutput>>
deleteIdPool(DeleteIdPoolInput input)
java.util.Map<java.lang.String,java.lang.String>
getLocalPoolsDetails()
Obtain description of ID pool/s.void
poolDeleted(java.lang.String parentPoolName, java.lang.String poolName)
com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<ReleaseIdOutput>>
releaseId(ReleaseIdInput input)
void
start()
boolean
updateLocalIdPoolCache(IdPool idPool, java.lang.String parentPoolName)
-
-
-
Constructor Detail
-
IdManager
@Inject public IdManager(org.opendaylight.controller.md.sal.binding.api.DataBroker db, LockManagerService lockManager, IdUtils idUtils, org.opendaylight.daexim.DataImportBootReady dataImportBootReady, org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator) throws org.opendaylight.controller.md.sal.common.api.data.ReadFailedException, java.lang.InterruptedException
- Throws:
org.opendaylight.controller.md.sal.common.api.data.ReadFailedException
java.lang.InterruptedException
-
-
Method Detail
-
getLocalPoolsDetails
public java.util.Map<java.lang.String,java.lang.String> getLocalPoolsDetails()
Description copied from interface:IdManagerMonitor
Obtain description of ID pool/s. Suitable for usage e.g. by a CLI tool.- Specified by:
getLocalPoolsDetails
in interfaceIdManagerMonitor
- Returns:
- Map with poolName as key, and a String describing the pool (e.g. with information about availableIds & releasedIds)
-
start
@PostConstruct public void start()
-
close
@PreDestroy public void close()
-
updateLocalIdPoolCache
public boolean updateLocalIdPoolCache(IdPool idPool, java.lang.String parentPoolName)
-
createIdPool
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<CreateIdPoolOutput>> createIdPool(CreateIdPoolInput input)
- Specified by:
createIdPool
in interfaceIdManagerService
-
allocateId
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<AllocateIdOutput>> allocateId(AllocateIdInput input)
- Specified by:
allocateId
in interfaceIdManagerService
-
allocateIdRange
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<AllocateIdRangeOutput>> allocateIdRange(AllocateIdRangeInput input)
- Specified by:
allocateIdRange
in interfaceIdManagerService
-
deleteIdPool
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<DeleteIdPoolOutput>> deleteIdPool(DeleteIdPoolInput input)
- Specified by:
deleteIdPool
in interfaceIdManagerService
-
releaseId
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<ReleaseIdOutput>> releaseId(ReleaseIdInput input)
- Specified by:
releaseId
in interfaceIdManagerService
-
poolDeleted
public void poolDeleted(java.lang.String parentPoolName, java.lang.String poolName)
-
-