@Deprecated public class PortableMarshaller extends org.apache.ignite.marshaller.AbstractMarshaller
Marshaller that lets to serialize and deserialize all objects
in the portable format.
PortableMarshaller is tested only on Java HotSpot VM on other VMs
it could yield unexpected results.
PortableMarshaller marshaller = new PortableMarshaller(); IgniteConfiguration cfg = new IgniteConfiguration(); // Override marshaller. cfg.setMarshaller(marshaller); // Starts grid. G.start(cfg);
<bean id="grid.custom.cfg" class="org.apache.ignite.configuration.IgniteConfiguration" singleton="true">
...
<property name="marshaller">
<bean class="org.gridgain.grid.marshaller.portable.PortableMarshaller">
...
</bean>
</property>
...
</bean>
For information about Spring framework visit www.springframework.org
| Modifier and Type | Field and Description |
|---|---|
static PortableProtocolVersion |
DFLT_PORTABLE_PROTO_VER
Deprecated.
Default portable protocol version.
|
| Constructor and Description |
|---|
PortableMarshaller()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<String> |
getClassNames()
Deprecated.
Gets class names.
|
PortableIdMapper |
getIdMapper()
Deprecated.
Gets ID mapper.
|
PortableProtocolVersion |
getProtocolVersion()
Deprecated.
Gets portable protocol version.
|
PortableSerializer |
getSerializer()
Deprecated.
Gets serializer.
|
Collection<PortableTypeConfiguration> |
getTypeConfigurations()
Deprecated.
Gets types configuration.
|
boolean |
isConvertStringToBytes()
Deprecated.
Gets strings must be converted to or from bytes using UTF-8 encoding.
|
boolean |
isKeepDeserialized()
Deprecated.
If
true, PortableObject will cache deserialized instance after
PortableObject.deserialize() is called. |
boolean |
isMetaDataEnabled()
Deprecated.
If
true, meta data will be collected or all types. |
boolean |
isUseTimestamp()
Deprecated.
If
true then date values converted to Timestamp on deserialization. |
byte[] |
marshal(Object obj)
Deprecated.
Marshals object to byte array.
|
void |
marshal(Object obj,
OutputStream out)
Deprecated.
Marshals object to the output stream.
|
void |
onUndeploy(ClassLoader ldr)
Deprecated.
Undeployment callback invoked when class loader is being undeployed.
|
void |
setClassNames(Collection<String> clsNames)
Deprecated.
Sets class names of portable objects explicitly.
|
void |
setConvertStringToBytes(boolean convertString)
Deprecated.
Sets strings must be converted to or from bytes using UTF-8 encoding.
|
void |
setIdMapper(PortableIdMapper idMapper)
Deprecated.
Sets ID mapper.
|
void |
setKeepDeserialized(boolean keepDeserialized)
Deprecated.
|
void |
setMetaDataEnabled(boolean metaDataEnabled)
Deprecated.
|
void |
setProtocolVersion(PortableProtocolVersion protoVer)
Deprecated.
Sets portable protocol version.
|
void |
setSerializer(PortableSerializer serializer)
Deprecated.
Sets serializer.
|
void |
setTypeConfigurations(Collection<PortableTypeConfiguration> typeCfgs)
Deprecated.
Sets type configurations.
|
void |
setUseTimestamp(boolean useTs)
Deprecated.
|
<T> T |
unmarshal(byte[] bytes,
ClassLoader clsLdr)
Deprecated.
Unmarshals object from byte array using given class loader.
|
<T> T |
unmarshal(InputStream in,
ClassLoader clsLdr)
Deprecated.
Unmarshals object from the input stream using given class loader.
|
public static final PortableProtocolVersion DFLT_PORTABLE_PROTO_VER
public Collection<String> getClassNames()
public void setClassNames(Collection<String> clsNames)
clsNames - Class names.public PortableIdMapper getIdMapper()
public void setIdMapper(PortableIdMapper idMapper)
idMapper - ID mapper.public PortableSerializer getSerializer()
public void setSerializer(PortableSerializer serializer)
serializer - Serializer.public Collection<PortableTypeConfiguration> getTypeConfigurations()
public void setTypeConfigurations(Collection<PortableTypeConfiguration> typeCfgs)
typeCfgs - Type configurations.public boolean isUseTimestamp()
Timestamp during unmarshalling.public void setUseTimestamp(boolean useTs)
useTs - Flag indicating whether date values converted to Timestamp during unmarshalling.public boolean isConvertStringToBytes()
Default value is true.
public void setConvertStringToBytes(boolean convertString)
Default value is true.
convertString - Flag indicating whether string must be converted to byte array using UTF-8 encoding.public boolean isMetaDataEnabled()
true, meta data will be collected or all types. If you need to override this behaviour for
some specific type, use PortableTypeConfiguration.setMetaDataEnabled(Boolean) method.
Default value if true.
public void setMetaDataEnabled(boolean metaDataEnabled)
metaDataEnabled - Whether meta data is collected.public boolean isKeepDeserialized()
true, PortableObject will cache deserialized instance after
PortableObject.deserialize() is called. All consequent calls of this
method on the same instance of PortableObject will return that cached
value without actually deserializing portable object. If you need to override this
behaviour for some specific type, use PortableTypeConfiguration.setKeepDeserialized(Boolean)
method.
Default value if true.
public void setKeepDeserialized(boolean keepDeserialized)
keepDeserialized - Whether deserialized value is kept.public PortableProtocolVersion getProtocolVersion()
Defaults to DFLT_PORTABLE_PROTO_VER.
public void setProtocolVersion(PortableProtocolVersion protoVer)
Defaults to DFLT_PORTABLE_PROTO_VER.
protoVer - Portable protocol version.public byte[] marshal(@Nullable
Object obj)
throws org.apache.ignite.IgniteCheckedException
obj - Object to marshal.org.apache.ignite.IgniteCheckedException - If marshalling failed.public void marshal(@Nullable
Object obj,
OutputStream out)
throws org.apache.ignite.IgniteCheckedException
obj - Object to marshal.out - Output stream to marshal into.org.apache.ignite.IgniteCheckedException - If marshalling failed.public <T> T unmarshal(byte[] bytes,
@Nullable
ClassLoader clsLdr)
throws org.apache.ignite.IgniteCheckedException
T - Type of unmarshalled object.bytes - Byte array.clsLdr - Class loader to use.org.apache.ignite.IgniteCheckedException - If unmarshalling failed.public <T> T unmarshal(InputStream in, @Nullable ClassLoader clsLdr) throws org.apache.ignite.IgniteCheckedException
T - Type of unmarshalled object.in - Input stream.clsLdr - Class loader to use.org.apache.ignite.IgniteCheckedException - If unmarshalling failed.public void onUndeploy(ClassLoader ldr)
onUndeploy in class org.apache.ignite.marshaller.AbstractMarshallerldr - Class loader being undeployed.
GridGain Fabric : ver. 7.8.12 Release Date : October 2 2017