Package com.sun.corba.ee.spi.copyobject
Class CopyobjectDefaults
java.lang.Object
com.sun.corba.ee.spi.copyobject.CopyobjectDefaults
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopier
private static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory
Obtain the reference object "copier".static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory
makeFallbackObjectCopierFactory
(org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory f1, org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory f2) Create a fallback copier factory from the two ObjectCopierFactory arguments.static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory
static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory
Obtain the old version of the reflective copier factory.static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory
Obtain the ORB stream copier factory.static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory
Obtain the new reflective copier factory.
-
Field Details
-
referenceObjectCopier
private static final org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopier referenceObjectCopier -
referenceObjectCopierFactory
private static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory referenceObjectCopierFactory
-
-
Constructor Details
-
CopyobjectDefaults
private CopyobjectDefaults()
-
-
Method Details
-
makeORBStreamObjectCopierFactory
public static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory makeORBStreamObjectCopierFactory(ORB orb) Obtain the ORB stream copier factory. Note that this version behaves differently than the others: each ObjectCopier produced by the factory only preserves aliasing within a single call to copy. The others copiers all preserve aliasing across all calls to copy (on the same ObjectCopier instance).- Parameters:
orb
- ORB to use for remote instances- Returns:
- CopierFactory
-
makeJavaStreamObjectCopierFactory
public static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory makeJavaStreamObjectCopierFactory(ORB orb) -
getReferenceObjectCopierFactory
public static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory getReferenceObjectCopierFactory()Obtain the reference object "copier". This does no copies: it just returns whatever is passed to it.- Returns:
- the reference copier
-
makeFallbackObjectCopierFactory
public static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory makeFallbackObjectCopierFactory(org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory f1, org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory f2) Create a fallback copier factory from the two ObjectCopierFactory arguments. This copier makes an ObjectCopierFactory that creates instances of a fallback copier that first tries an ObjectCopier created from f1, then tries one created from f2, if the first throws a ReflectiveCopyException.- Parameters:
f1
- Factory to try firstf2
- Factory to try second- Returns:
- CopierFactory
-
makeOldReflectObjectCopierFactory
public static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory makeOldReflectObjectCopierFactory(ORB orb) Obtain the old version of the reflective copier factory. This is provided only for benchmarking purposes.- Parameters:
orb
- ORB to use for remote instances- Returns:
- CopierFactory
-
makeReflectObjectCopierFactory
public static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory makeReflectObjectCopierFactory(ORB orb) Obtain the new reflective copier factory. This is 3-4 times faster than the stream copier, and about 10% faster than the old reflective copier. It should normally be used with a fallback copier, as there are some classes that simply cannot be copied reflectively.- Parameters:
orb
- ORB to use for remote instances- Returns:
- CopierFactory
-