Interface MarshallerContext


  • public interface MarshallerContext
    Marshaller context.
    • Method Detail

      • registerClassName

        default boolean registerClassName​(byte platformId,
                                          int typeId,
                                          String clsName,
                                          boolean failIfUnregistered)
                                   throws IgniteCheckedException
        Method to register typeId->class name mapping in marshaller context <b>cluster-wide</b>. This method guarantees that mapping is delivered to all nodes in cluster and blocks caller thread until then.
        Parameters:
        platformId - Id of a platform (java, .NET, etc.) to register mapping for.
        typeId - Type ID.
        clsName - Class name.
        failIfUnregistered - If true then throw UnregisteredBinaryTypeException with registration future instead of synchronously awaiting for its completion.
        Returns:
        True if mapping was registered successfully.
        Throws:
        IgniteCheckedException - In case of error.
      • registerClassNameLocally

        boolean registerClassNameLocally​(byte platformId,
                                         int typeId,
                                         String clsName)
                                  throws IgniteCheckedException
        Method to register typeId->class name mapping in marshaller context <b>on local node only</b>. No guarantees that the mapping is presented on other nodes are provided. This method is safe to use if there is another source of mappings like metadata persisted on disk and this source is known to be solid and free of conflicts beforehand.
        Parameters:
        platformId - Id of a platform (java, .NET, etc.) to register mapping for.
        typeId - Type id.
        clsName - Class name.
        Returns:
        True if class mapping was registered successfully.
        Throws:
        IgniteCheckedException - In case of error.
      • isSystemType

        boolean isSystemType​(String typeName)
        Checks whether the given type is a system one - JDK class or Ignite class.
        Parameters:
        typeName - Type name.
        Returns:
        true if the type is a system one, false otherwise.
      • classNameFilter

        IgnitePredicate<String> classNameFilter()
        Returns class name filter.
        Returns:
        Class name filter.
      • jdkMarshaller

        JdkMarshaller jdkMarshaller()
        Returns:
        JDK marshaller instance.