|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.persist.impl.VisitedObjects
class VisitedObjects
Keeps track of a set of visited objects and their corresponding offset in a byte array. This uses a resizable int array for speed and simplicity. If in the future the array resizing or linear search are performance issues, we could try using an IdentityHashMap instead.
Constructor Summary | |
---|---|
VisitedObjects()
Creates an empty set. |
Method Summary | |
---|---|
(package private) void |
add(java.lang.Object o,
int offset)
Adds a visited object and offset, growing the visited arrays as needed. |
(package private) java.lang.Object |
getObject(int offset)
Returns the visited object for a given offset, or null if never visited. |
(package private) int |
getOffset(java.lang.Object o)
Returns the offset for a visited object, or -1 if never visited. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
VisitedObjects()
Method Detail |
---|
void add(java.lang.Object o, int offset)
int getOffset(java.lang.Object o)
java.lang.Object getObject(int offset)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |