Class IdUtils


  • @Singleton
    public class IdUtils
    extends java.lang.Object
    • Constructor Detail

      • IdUtils

        public IdUtils()
                throws java.net.UnknownHostException
        Throws:
        java.net.UnknownHostException
    • Method Detail

      • removeAllocatedIds

        public java.util.concurrent.CompletableFuture<java.util.List<org.opendaylight.yangtools.yang.common.Uint32>> removeAllocatedIds​(java.lang.String uniqueIdKey)
      • putAllocatedIdsIfAbsent

        public java.util.concurrent.CompletableFuture<java.util.List<org.opendaylight.yangtools.yang.common.Uint32>> putAllocatedIdsIfAbsent​(java.lang.String uniqueIdKey,
                                                                                                                                             java.util.concurrent.CompletableFuture<java.util.List<org.opendaylight.yangtools.yang.common.Uint32>> futureIdValues)
      • putReleaseIdLatch

        public void putReleaseIdLatch​(java.lang.String uniqueIdKey,
                                      java.util.concurrent.CountDownLatch latch)
      • getReleaseIdLatch

        public java.util.concurrent.CountDownLatch getReleaseIdLatch​(java.lang.String uniqueIdKey)
      • removeReleaseIdLatch

        public java.util.concurrent.CountDownLatch removeReleaseIdLatch​(java.lang.String uniqueIdKey)
      • getIdEntry

        public org.opendaylight.yangtools.yang.binding.InstanceIdentifier<IdEntries> getIdEntry​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<IdPool> poolName,
                                                                                                java.lang.String idKey)
      • createIdEntries

        public IdEntries createIdEntries​(java.lang.String idKey,
                                         java.util.List<org.opendaylight.yangtools.yang.common.Uint32> newIdVals)
      • createDelayedIdEntry

        public DelayedIdEntries createDelayedIdEntry​(long idValue,
                                                     long delayTime)
      • createGlobalPool

        protected IdPool createGlobalPool​(java.lang.String poolName,
                                          long low,
                                          long high,
                                          long blockSize)
      • createAvailableIdsHolder

        public AvailableIdsHolder createAvailableIdsHolder​(long low,
                                                           long high,
                                                           long cursor)
      • createReleasedIdsHolder

        protected ReleasedIdsHolder createReleasedIdsHolder​(long availableIdCount,
                                                            long delayTime)
      • getIdPoolInstance

        public org.opendaylight.yangtools.yang.binding.InstanceIdentifier<IdPool> getIdPoolInstance​(java.lang.String poolName)
      • getReleasedIdsHolderInstance

        public org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ReleasedIdsHolder> getReleasedIdsHolderInstance​(java.lang.String poolName)
      • getLocalPoolName

        public java.lang.String getLocalPoolName​(java.lang.String poolName)
      • createChildPool

        protected ChildPools createChildPool​(java.lang.String childPoolName)
      • freeExcessAvailableIds

        public void freeExcessAvailableIds​(ReleasedIdHolder releasedIdHolder,
                                           ReleasedIdsHolderBuilder releasedIdsParent,
                                           long idCountToBeFreed)
        Changes made to the parameters passed are not persisted to the Datastore. Method invoking should ensure that these gets persisted.
      • getIdEntriesInstanceIdentifier

        public org.opendaylight.yangtools.yang.binding.InstanceIdentifier<IdEntries> getIdEntriesInstanceIdentifier​(java.lang.String poolName,
                                                                                                                    java.lang.String idKey)
      • getChildPoolsInstanceIdentifier

        protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ChildPools> getChildPoolsInstanceIdentifier​(java.lang.String poolName,
                                                                                                                         java.lang.String localPoolName)
      • computeBlockSize

        public long computeBlockSize​(long low,
                                     long high)
      • unlock

        public void unlock​(LockManagerService lockManager,
                           java.lang.String poolName)
      • getIdPools

        public org.opendaylight.yangtools.yang.binding.InstanceIdentifier<IdPools> getIdPools()
      • incrementPoolUpdatedMap

        public void incrementPoolUpdatedMap​(java.lang.String localPoolName)
      • decrementPoolUpdatedMap

        public void decrementPoolUpdatedMap​(java.lang.String localPoolName)
      • getPoolUpdatedMap

        public boolean getPoolUpdatedMap​(java.lang.String localPoolName)
      • removeFromPoolUpdatedMap

        public void removeFromPoolUpdatedMap​(java.lang.String localPoolName)
      • getUniqueKey

        public java.lang.String getUniqueKey​(java.lang.String parentPoolName,
                                             java.lang.String idKey)