public class OAVWeakIdGenerator extends java.lang.Object implements IOAVIdGenerator
Modifier and Type | Class and Description |
---|---|
static class |
OAVWeakIdGenerator.OAVExternalObjectId
An id for an OAV object.
|
static class |
OAVWeakIdGenerator.OAVInternalObjectId
An id for an OAV object.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.Map |
counters
The id counter map (type -> count).
|
protected java.lang.ref.ReferenceQueue |
queue
The reference queue for stale external ids.
|
Constructor and Description |
---|
OAVWeakIdGenerator(java.lang.ref.ReferenceQueue queue)
Create a new id generator.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
createId(IOAVState state,
OAVObjectType type)
Create a unique id.
|
boolean |
isId(java.lang.Object id)
Test if an object is an id.
|
protected java.util.Map counters
protected java.lang.ref.ReferenceQueue queue
public OAVWeakIdGenerator(java.lang.ref.ReferenceQueue queue)
public java.lang.Object createId(IOAVState state, OAVObjectType type)
createId
in interface IOAVIdGenerator
state
- The state.type
- The object type.public boolean isId(java.lang.Object id)
isId
in interface IOAVIdGenerator
state
- The state.type
- The object type.