Class ReleasedIdHolder
- java.lang.Object
-
- org.opendaylight.genius.idmanager.ReleasedIdHolder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReleasedIdHolder.DelayedIdEntry
-
Constructor Summary
Constructors Constructor Description ReleasedIdHolder(IdUtils idUtils, long timeDelaySec)
ReleasedIdHolder(IdUtils idUtils, long timeDelaySec, java.util.List<ReleasedIdHolder.DelayedIdEntry> delayedEntries)
-
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()
@NonNull java.util.List<ReleasedIdHolder.DelayedIdEntry>
getDelayedEntries()
long
getTimeDelaySec()
boolean
isIdAvailable(long curTimeSec)
void
refreshDataStore(IdPoolBuilder idPoolBuilder)
void
replaceDelayedEntries(@NonNull java.util.List<ReleasedIdHolder.DelayedIdEntry> newDelayedEntries)
void
setAvailableIdCount(long availableIdCount)
java.lang.String
toString()
-
-
-
Constructor Detail
-
ReleasedIdHolder
public ReleasedIdHolder(IdUtils idUtils, long timeDelaySec)
-
ReleasedIdHolder
public ReleasedIdHolder(IdUtils idUtils, long timeDelaySec, java.util.List<ReleasedIdHolder.DelayedIdEntry> delayedEntries)
-
-
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
-
getAvailableIdCount
public long getAvailableIdCount()
- Specified by:
getAvailableIdCount
in interfaceIdHolder
-
getTimeDelaySec
public long getTimeDelaySec()
-
getDelayedEntries
public @NonNull java.util.List<ReleasedIdHolder.DelayedIdEntry> getDelayedEntries()
-
replaceDelayedEntries
public void replaceDelayedEntries(@NonNull java.util.List<ReleasedIdHolder.DelayedIdEntry> newDelayedEntries)
-
setAvailableIdCount
public void setAvailableIdCount(long availableIdCount)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
refreshDataStore
public void refreshDataStore(IdPoolBuilder idPoolBuilder)
- Specified by:
refreshDataStore
in interfaceIdHolder
-
-