@NotThreadSafe public class CopyState extends Object implements Cloneable
Instances are not thread safe.
JObject.copyTo()
,
JTransaction.copyTo()
Constructor and Description |
---|
CopyState()
Default constructor.
|
CopyState(ObjIdSet copied)
Constructor to use when a set of known objects has already been copied.
|
Modifier and Type | Method and Description |
---|---|
CopyState |
clone() |
boolean |
isCopied(ObjId id)
Determine if an object has been marked as copied.
|
boolean |
markCopied(ObjId id)
Determine if an object has already been copied, and if not mark it so.
|
boolean |
markTraversed(ObjId id,
int[] fields)
Determine if the specified reference path has already been traversed starting at the given object, and if not mark it so.
|
public CopyState()
public CopyState(ObjIdSet copied)
copied
- the ID's of objects that have already been copiedIllegalArgumentException
- if copied
is nullpublic boolean markCopied(ObjId id)
id
- object ID of object being copiedid
was not previously marked copied, otherwise falseIllegalArgumentException
- if id
is nullpublic boolean isCopied(ObjId id)
id
has been marked copied, otherwise falseIllegalArgumentException
- if id
is nullpublic boolean markTraversed(ObjId id, int[] fields)
id
- object ID of object being copiedfields
- reference path storage IDsfields
was not previously marked as traversed from id
, otherwise falseIllegalArgumentException
- if either parameter is nullIllegalArgumentException
- if fields
has length zeroCopyright © 2016. All rights reserved.