ModeShape Distribution 3.0.0.Beta4

Class SchematicExternalizer<T>

  extended by org.infinispan.schematic.internal.SchematicExternalizer<T>
Type Parameters:
T - the type of class
All Implemented Interfaces:
Serializable, org.infinispan.marshall.Externalizer<T>
Direct Known Subclasses:
AddValueIfAbsentOperation.Externalizer, AddValueOperation.Externalizer, 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, SchematicEntryDelta.Externalizer, SchematicEntryLiteral.Externalizer, SetValueOperation.Externalizer, Symbol.Externalizer, Timestamp.Externalizer

public abstract class SchematicExternalizer<T>
extends Object
implements org.infinispan.marshall.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
Method Summary
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.marshall.Externalizer
readObject, writeObject

Constructor Detail


public SchematicExternalizer()
Method Detail


public abstract Integer getId()


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

ModeShape Distribution 3.0.0.Beta4

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