Class BinaryMarshaller

    • Constructor Detail

      • BinaryMarshaller

        public BinaryMarshaller()
    • Method Detail

      • available

        public static boolean available()
        Checks whether BinaryMarshaller is able to work on the current JVM.

        As long as BinaryMarshaller uses JVM-private API, which is not guaranteed to be available on all JVM, this method should be called to ensure marshaller could work properly.

        Result of this method is automatically checked in constructor.

        Returns:
        true if BinaryMarshaller can work on the current JVM or false if it can't.
      • unmarshal0

        protected <T> T unmarshal0​(byte[] bytes,
                                   @Nullable
                                   @Nullable ClassLoader clsLdr)
        Unmarshals object from byte array using given class loader.
        Specified by:
        unmarshal0 in class AbstractNodeNameAwareMarshaller
        Type Parameters:
        T - Type of unmarshalled object.
        Parameters:
        bytes - Byte array.
        clsLdr - If not null then given class loader will be used for unmarshal object.
        Returns:
        Unmarshalled object.
      • unmarshal0

        protected <T> T unmarshal0​(InputStream in,
                                   @Nullable
                                   @Nullable ClassLoader clsLdr)
                            throws IgniteCheckedException
        Unmarshals object from the input stream using given class loader. This method should not close given input stream.
        Specified by:
        unmarshal0 in class AbstractNodeNameAwareMarshaller
        Type Parameters:
        T - Type of unmarshalled object.
        Parameters:
        in - Input stream.
        clsLdr - If not null then given class loader will be used for unmarshal object.
        Returns:
        Unmarshalled object.
        Throws:
        IgniteCheckedException - If unmarshalling failed.
      • onUndeploy

        public void onUndeploy​(ClassLoader ldr)
        Undeployment callback invoked when class loader is being undeployed. Some marshallers may want to clean their internal state that uses the undeployed class loader somehow.
        Specified by:
        onUndeploy in class AbstractMarshaller
        Parameters:
        ldr - Class loader being undeployed.
      • binaryMarshaller

        public GridBinaryMarshaller binaryMarshaller()
        Returns:
        GridBinaryMarshaller instance.