Class ClusterUtil


  • public class ClusterUtil
    extends java.lang.Object
    • Constructor Detail

      • ClusterUtil

        public ClusterUtil()
    • Method Detail

      • serializeObject

        public static byte[] serializeObject​(java.io.Serializable o)
                                      throws java.lang.Exception
        Serializes an Object so it can be sent over the cluster.
        Parameters:
        o - Object to serialize.
        Returns:
        byte[] representing serialized object.
        Throws:
        java.lang.Exception
      • serializeAndGZipObject

        public static byte[] serializeAndGZipObject​(java.io.Serializable o)
                                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • deserializeObject

        public static java.lang.Object deserializeObject​(GatewayContext context,
                                                         byte[] b)
                                                  throws java.lang.Exception
        Deserializes an object that was serialized by serializeObject(). Requires the gateway context so it can resolve classes provided by modules.
        Parameters:
        b - byte[] to deserialize.
        Returns:
        Object representing the deserialized byte[].
        Throws:
        java.lang.Exception
      • unzipAndDeserializeObject

        public static java.lang.Object unzipAndDeserializeObject​(GatewayContext context,
                                                                 byte[] b)
                                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • deserializeObject

        public static java.lang.Object deserializeObject​(GatewayContext context,
                                                         java.io.InputStream stream)
                                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • deserializeObject

        public static java.lang.Object deserializeObject​(java.io.InputStream stream)
                                                  throws java.lang.Exception
        Throws:
        java.lang.Exception