public abstract class AbstractNodeNameAwareMarshaller extends AbstractMarshaller
Ignition.localIgnite()
calls.ctx, DFLT_BUFFER_SIZE
Constructor and Description |
---|
AbstractNodeNameAwareMarshaller() |
Modifier and Type | Method and Description |
---|---|
byte[] |
marshal(@Nullable Object obj)
Marshals object to byte array.
|
void |
marshal(@Nullable Object obj,
OutputStream out)
Marshals object to the output stream.
|
protected abstract byte[] |
marshal0(@Nullable Object obj)
Marshals object to byte array.
|
protected abstract void |
marshal0(@Nullable Object obj,
OutputStream out)
Marshals object to the output stream.
|
void |
nodeName(@Nullable String nodeName)
Set node name.
|
<T> T |
unmarshal(byte[] arr,
@Nullable ClassLoader clsLdr)
Unmarshals object from byte array using given class loader.
|
<T> T |
unmarshal(InputStream in,
@Nullable ClassLoader clsLdr)
Unmarshals object from the input stream using given class loader.
|
protected abstract <T> T |
unmarshal0(byte[] arr,
@Nullable ClassLoader clsLdr)
Unmarshals object from byte array using given class loader.
|
protected abstract <T> T |
unmarshal0(InputStream in,
@Nullable ClassLoader clsLdr)
Unmarshals object from the input stream using given class loader.
|
getContext, onUndeploy, setContext
public void nodeName(@Nullable @Nullable String nodeName)
nodeName
- Node name.public byte[] marshal(@Nullable @Nullable Object obj) throws IgniteCheckedException
obj
- Object to marshal. null
object will be marshaled to binary null
representation.IgniteCheckedException
- If marshalling failed.public void marshal(@Nullable @Nullable Object obj, OutputStream out) throws IgniteCheckedException
obj
- Object to marshal. null
object will be marshaled to binary null
representation.out
- Output stream to marshal into.IgniteCheckedException
- If marshalling failed.public <T> T unmarshal(byte[] arr, @Nullable @Nullable ClassLoader clsLdr) throws IgniteCheckedException
T
- Type of unmarshalled object.arr
- Byte array.clsLdr
- If not null
then given class loader will be used for unmarshal object.IgniteCheckedException
- If unmarshalling failed.public <T> T unmarshal(InputStream in, @Nullable @Nullable ClassLoader clsLdr) throws IgniteCheckedException
T
- Type of unmarshalled object.in
- Input stream.clsLdr
- If not null
then given class loader will be used for unmarshal object.IgniteCheckedException
- If unmarshalling failed.protected abstract void marshal0(@Nullable @Nullable Object obj, OutputStream out) throws IgniteCheckedException
obj
- Object to marshal. null
object will be marshaled to binary null
representation.out
- Output stream to marshal into.IgniteCheckedException
- If marshalling failed.protected abstract byte[] marshal0(@Nullable @Nullable Object obj) throws IgniteCheckedException
obj
- Object to marshal. null
object will be marshaled to binary null
representation.IgniteCheckedException
- If marshalling failed.protected abstract <T> T unmarshal0(InputStream in, @Nullable @Nullable ClassLoader clsLdr) throws IgniteCheckedException
T
- Type of unmarshalled object.in
- Input stream.clsLdr
- If not null
then given class loader will be used for unmarshal object.IgniteCheckedException
- If unmarshalling failed.protected abstract <T> T unmarshal0(byte[] arr, @Nullable @Nullable ClassLoader clsLdr) throws IgniteCheckedException
T
- Type of unmarshalled object.arr
- Byte array.clsLdr
- If not null
then given class loader will be used for unmarshal object.IgniteCheckedException
- If unmarshalling failed.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023