JavaSerialization (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.io.serializer, class: JavaSerialization

Package org.apache.hadoop.io.serializer

# Class JavaSerialization

java.lang.Object
org.apache.hadoop.io.serializer.JavaSerialization

All Implemented Interfaces:
  `org.apache.hadoop.io.serializer.Serialization<Serializable>`

@Public @Unstable public class JavaSerialization extends Object implements org.apache.hadoop.io.serializer.Serialization<Serializable>

An experimental `Serialization` for Java `Serializable` classes.

See Also:
  - `JavaSerializationComparator`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JavaSerialization()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `accept(Class<?> c)`
  Allows clients to test whether this `Serialization` supports the given class.
  `org.apache.hadoop.io.serializer.Deserializer<Serializable>`
  `getDeserializer(Class<Serializable> c)`
  `org.apache.hadoop.io.serializer.Serializer<Serializable>`
  `getSerializer(Class<Serializable> c)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JavaSerialization

    public JavaSerialization()

- ## Method Details

  - ### accept

    @Private public boolean accept(Class<?> c)
    Description copied from interface: `org.apache.hadoop.io.serializer.Serialization`
    Allows clients to test whether this `Serialization` supports the given class.
    Specified by:
      `accept` in interface `org.apache.hadoop.io.serializer.Serialization<Serializable>`
    Parameters:
      `c` - class.
    Returns:
      if accept true,not false.

  - ### getDeserializer

    @Private public org.apache.hadoop.io.serializer.Deserializer<Serializable> getDeserializer(Class<Serializable> c)
    Specified by:
      `getDeserializer` in interface `org.apache.hadoop.io.serializer.Serialization<Serializable>`
    Parameters:
      `c` - class.
    Returns:
      a `Deserializer` for the given class.

  - ### getSerializer

    @Private public org.apache.hadoop.io.serializer.Serializer<Serializable> getSerializer(Class<Serializable> c)
    Specified by:
      `getSerializer` in interface `org.apache.hadoop.io.serializer.Serialization<Serializable>`
    Parameters:
      `c` - class.
    Returns:
      a `Serializer` for the given class.