org.infinispan.schematic.internal

## Class SchematicExternalizer<T>

- java.lang.Object
- - org.infinispan.schematic.internal.SchematicExternalizer<T>

- Type Parameters:
    `T` - the type of class
  All Implemented Interfaces:
    Serializable, Externalizer<T>
  Direct Known Subclasses:
    AddValueIfAbsentOperation.Externalizer, AddValueOperation.Externalizer, ArrayExternalizer, Binary.Externalizer, ClearOperation.Externalizer, Code.Externalizer, DocumentExternalizer, MaxKey.Externalizer, MinKey.Externalizer, Null.Externalizer, ObjectId.Externalizer, Paths.Externalizer, PutIfAbsentOperation.Externalizer, PutOperation.Externalizer, RemoveAllValuesOperation.Externalizer, RemoveAtIndexOperation.Externalizer, RemoveOperation.Externalizer, RemoveValueOperation.Externalizer, RetainAllValuesOperation.Externalizer, SchematicEntryLiteral.Externalizer, SetValueOperation.Externalizer, Symbol.Externalizer, Timestamp.Externalizer

      public abstract class SchematicExternalizer<T>
      extends Object
      implements Externalizer<T>

  An abstract base class for all Schematic `Externalizer` implementations.

  There are two primary advantages of implementing `AdvancedExternalizer` versus implementing `Externalizer`:

  1. The class to be externalized must be modified with a `@SerializeWith` annotation. Since `SchematicEntryLiteral` is our class, this is possible.
  2. The generated payloads (shipped between Infinispan processes) are slightly smaller, since it includes only the `AdvancedExternalizer`'s `identifier` instead of the class information and/or the serialized `Externalizer`. But for this to work, the advanced externalizers need to be registered with the cache container at startup.
  Unfortunately, Infinispan in AS7.1 does not allow defining `AdvancedExternalizer` classes for the cache container, and thus they cannot be used (see MODE-1524 for details). Therefore, we have to rely only upon implementing `Externalizer`.

  This abstract class was created so that the Schematic externalizers can easily extend it, but so that we can encapsulate in this abstract class the use of `Externalizer` or `AdvancedExternalizer`. Once Infinispan in AS7 supports user-defined advanced externalizers, then we can simply change this class to implement `AdvancedExternalizer` rather than `Externalizer`.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SchematicExternalizer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract Integer` | `getId()`
    `abstract Set<Class<? extends T>>` | `getTypeClasses()`

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

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

    - ### Methods inherited from interface org.infinispan.commons.marshall.Externalizer

      `readObject, writeObject`

- - ### Constructor Detail

    - #### SchematicExternalizer

          public SchematicExternalizer()

  - ### Method Detail

    - #### getId

          public abstract Integer getId()

    - #### getTypeClasses

          public abstract Set<Class<? extends T>> getTypeClasses()

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.