org.infinispan.marshall
Interface Externalizer

All Known Implementing Classes:
AbstractWheelConsistentHash.Externalizer, ArrayListExternalizer, AtomicHashMap.Externalizer, AtomicHashMapDelta.Externalizer, Bucket.Externalizer, ByteArrayKey.Externalizer, ClearOperation.Externalizer, DefaultConsistentHash.Externalizer, DldGlobalTransaction.Externalizer, ExceptionResponse.Externalizer, ExperimentalDefaultConsistentHash.Externalizer, ExtendedResponse.Externalizer, Fqn.Externalizer, GlobalTransaction.Externalizer, ImmortalCacheEntry.Externalizer, ImmortalCacheValue.Externalizer, JGroupsAddress.Externalizer, LinkedListExternalizer, MapExternalizer, MarshalledValue.Externalizer, MortalCacheEntry.Externalizer, MortalCacheValue.Externalizer, NodeKey.Externalizer, NodeTopologyInfo.NodeTopologyInfoExternalizer, PutOperation.Externalizer, RemoteTransactionLogDetails.Externalizer, RemoveOperation.Externalizer, ReplicableCommandExternalizer, RequestIgnoredResponse.Externalizer, SetExternalizer, SingletonListExternalizer, SuccessfulResponse.Externalizer, TopologyAwareConsistentHash.Externalizer, TransactionLog.LogEntry.Externalizer, TransientCacheEntry.Externalizer, TransientCacheValue.Externalizer, TransientMortalCacheEntry.Externalizer, TransientMortalCacheValue.Externalizer, UnionConsistentHash.Externalizer, UnsuccessfulResponse.Externalizer, UnsureResponse.Externalizer

public interface Externalizer

Extended interface that extends capabilities of writing predefined objects with the possibility of reading them. Any new externalizer implementations should implement this interface. Implementations are free to write class information to the wire as they wish. See ReplicableCommandExternalizer for an such example. To add a new Externalizer, follow these steps: 1. Create an implementation of Externalizer. 2. Add class that Externalizer implementation marshalls to set in ConstantObjectTable.MARSHALLABLES 3. Annotate the class being marshalled with Marshallable indicating the Externalizer implementation and a unique index number.

Since:
4.0
Author:
Galder ZamarreƱo

Method Summary
 Object readObject(ObjectInput input)
          Read an instance from the stream.
 void writeObject(ObjectOutput output, Object object)
          Write the predefined object reference to the stream.
 

Method Detail

writeObject

void writeObject(ObjectOutput output,
                 Object object)
                 throws IOException
Write the predefined object reference to the stream.

Parameters:
output - the object output to write to
object - the object reference to write
Throws:
IOException - if an I/O error occurs

readObject

Object readObject(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Read an instance from the stream. The instance will have been written by the #writeObject(Object) method.

Parameters:
input - the object input to read from
Returns:
the object instance
Throws:
IOException - if an I/O error occurs
ClassNotFoundException - if a class could not be found


Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.