Class AvailableIdHolder
- java.lang.Object
-
- org.opendaylight.genius.idmanager.AvailableIdHolder
-
-
Constructor Summary
Constructors Constructor Description AvailableIdHolder(IdUtils idUtils, long low, long high)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addId(long id)
java.util.Optional<java.lang.Long>
allocateId()
long
getAvailableIdCount()
java.util.concurrent.atomic.AtomicLong
getCur()
long
getHigh()
long
getLow()
boolean
isIdAvailable(long curTimeSec)
void
refreshDataStore(IdPoolBuilder idPoolBuilder)
void
setCur(long cur)
java.lang.String
toString()
-
-
-
Constructor Detail
-
AvailableIdHolder
public AvailableIdHolder(IdUtils idUtils, long low, long high)
-
-
Method Detail
-
allocateId
public java.util.Optional<java.lang.Long> allocateId()
- Specified by:
allocateId
in interfaceIdHolder
-
isIdAvailable
public boolean isIdAvailable(long curTimeSec)
- Specified by:
isIdAvailable
in interfaceIdHolder
-
getLow
public long getLow()
-
getHigh
public long getHigh()
-
getCur
public java.util.concurrent.atomic.AtomicLong getCur()
-
getAvailableIdCount
public long getAvailableIdCount()
- Specified by:
getAvailableIdCount
in interfaceIdHolder
-
setCur
public void setCur(long cur)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
refreshDataStore
public void refreshDataStore(IdPoolBuilder idPoolBuilder)
- Specified by:
refreshDataStore
in interfaceIdHolder
-
-