public class ReusingDBIDFactory extends SimpleDBIDFactory
Modifier and Type | Field and Description |
---|---|
(package private) int |
dynamicStart
Keep track of the lowest unused dynamic DBID
|
(package private) BitSet |
dynamicUsed
Bit set to keep track of dynamic DBIDs
|
private static Logging |
logger
Logging for error messages.
|
(package private) ArrayList<IntegerDBIDRange> |
returnedAllocations
Returned range allocations
|
dynamicids, rangestart
FACTORY
Constructor and Description |
---|
ReusingDBIDFactory()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
deallocateDBIDRange(DBIDRange range)
Deallocate a static DBID range.
|
void |
deallocateSingleDBID(DBID id)
Return a single DBID for reuse.
|
DBID |
generateSingleDBID()
Generate a single DBID
|
DBIDRange |
generateStaticDBIDRange(int size)
Generate a static DBID range.
|
getDBIDSerializer, getDBIDSerializerStatic, getTypeRestriction, importInteger, makePair, newArray, newArray, newArray, newHashSet, newHashSet, newHashSet, newTreeSet, newTreeSet, newTreeSet
private static final Logging logger
BitSet dynamicUsed
int dynamicStart
ArrayList<IntegerDBIDRange> returnedAllocations
public DBID generateSingleDBID()
DBIDFactory
generateSingleDBID
in interface DBIDFactory
generateSingleDBID
in class SimpleDBIDFactory
public void deallocateSingleDBID(DBID id)
DBIDFactory
deallocateSingleDBID
in interface DBIDFactory
deallocateSingleDBID
in class SimpleDBIDFactory
id
- DBID to deallocatepublic DBIDRange generateStaticDBIDRange(int size)
DBIDFactory
generateStaticDBIDRange
in interface DBIDFactory
generateStaticDBIDRange
in class SimpleDBIDFactory
size
- Requested sizepublic void deallocateDBIDRange(DBIDRange range)
DBIDFactory
deallocateDBIDRange
in interface DBIDFactory
deallocateDBIDRange
in class SimpleDBIDFactory
range
- Range to deallocate