Class Serializer


  • public class Serializer
    extends java.lang.Object
    The injection points for the Node and Triple Serializable process. This class is public to allow system initialization to inject handler functions for Node and Triple. See also Quad.
    • Constructor Summary

      Constructors 
      Constructor Description
      Serializer()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.function.Function<Node,​java.lang.Object> getNodeSerializer()
      Return the current node serializer replacement function.
      static java.util.function.Function<Triple,​java.lang.Object> getTripleSerializer()
      Return the current triple serializer replacement function.
      static void setNodeSerializer​(java.util.function.Function<Node,​java.lang.Object> writeReplaceFunction)
      Set the node serializer replacement function.
      static void setTripleSerializer​(java.util.function.Function<Triple,​java.lang.Object> writeReplaceFunction)
      Set the triple serializer replacement function.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Serializer

        public Serializer()
    • Method Detail

      • setNodeSerializer

        public static void setNodeSerializer​(java.util.function.Function<Node,​java.lang.Object> writeReplaceFunction)
        Set the node serializer replacement function. This is a function called by Node.writeReplace during the Serializable process. The return is an object used in place of Node for the serialization.
         ANY-ACCESS-MODIFIER Object writeReplace() throws ObjectStreamException;
         

        The returned object must provide

         ANY-ACCESS-MODIFIER Object readResolve() throws ObjectStreamException;
         

        where "Object" is a Node.

        See Also:
        Serializable
      • getNodeSerializer

        public static java.util.function.Function<Node,​java.lang.Object> getNodeSerializer()
        Return the current node serializer replacement function.
      • setTripleSerializer

        public static void setTripleSerializer​(java.util.function.Function<Triple,​java.lang.Object> writeReplaceFunction)
        Set the triple serializer replacement function. This is a function called by Triple.writeReplace during the Serializable process. The return is an object used in place of Triple for the serialization.
         ANY-ACCESS-MODIFIER Object writeReplace() throws ObjectStreamException;
         

        The returned object must provide

         ANY-ACCESS-MODIFIER Object readResolve() throws ObjectStreamException;
         

        where "Object" is a Triple.

        See Also:
        Serializable
      • getTripleSerializer

        public static java.util.function.Function<Triple,​java.lang.Object> getTripleSerializer()
        Return the current triple serializer replacement function.